Hi Pants team, I am wondering if you would add sup...
# general
w
Hi Pants team, I am wondering if you would add support for some tools which are not supported yet, thing like import-linter, doctest. Or is it easy for us to add them ourselves?
h
We are definitely happy to help people contribute new tools! This is how we got support for Autoflake, Pyupgrade, Yapf, Pylint, etc For example https://github.com/pantsbuild/pants/issues/15240 for thoughts on how to add
pydocstyle
Would you be interested in contributing a particular tool?
s
If @wide-zoo-86070 doesn’t claim it, I would be interested in contributing
import-linter
w
@sparse-lifeguard-95737 go ahead. I can take doctest.
h
re doctest, check out https://github.com/pantsbuild/pants/issues/11227 I'm still not sure on the best modeling. I'll comment
h
There has been some discussion of import-linter before. It's totally fine to add as-is, but there is also this ticket, for more general support: https://github.com/pantsbuild/pants/issues/13393
s
yes my guess/impression is that the import-linter plugin would be quicker to get working and possible for me to do as an external contributor - the bigger “visibility” support is probably beyond me at this point 🙂
h
The nice thing about that more general mechanism is that it would work across languages, and across dependencies that aren't captured by
import
analysis alone, such as dependencies on data files, or dynamically loaded files (e.g., Django apps loaded by name at runtime)
But bird in the hand etc...
h
Any ideas what we should do with import linter after we add general support? Deprecate?
h
No need? People may have existing import-linter config that they want to apply as they onboard?
👍 1
w
Hi @hundreds-father-404 Could you provide a little more details on general support? I believe pants is supposed to be used in monorepo, which features similar to import-linter is important and come out from the box? is it s a priority from pants’ perspective?
s
re: the
import-linter
plugin, I’ve reached the point of staring at rule graph errors from the new plugin’s integration tests. so depending on how debugging goes, I’ll hopefully have a PR up soon 🙂
🙌 1
@wide-zoo-86070 I got the plumbing for the
import-linter
plugin working, only to run into some conceptual mismatches between what
import-linter
expects and the way Pants “usually” works. there are some potential work-arounds but I think the UX would be really ugly, so I’ve decided to abandon this effort. I wrote up my thoughts here: https://github.com/pantsbuild/pants/issues/15247#issuecomment-1114952690