Anyone have pyink working as a linter?
# general
b
Anyone have pyink working as a linter?
Currently (pre-pants) we use black-based tools and specify the path to the pyink binary and that works. I didn't see a way to specify the binary path with
pants.backend.python.lint.black
? Maybe I've just missed it though
g
Does https://www.pantsbuild.org/docs/reference-black#entry_point work for this? I haven't tried it, but it seems possible at a glance.
👀 1
b
I don't see an obvious way -- I may have to add pyink to the tool's
requirements
so it gets installed, and then I could try
entry_point = "pyink.patched_main"
eh, looks like I can get away with just using yapf instead 🙃
g
That was pretty much my thought-process, yeah. But if
yapf
works fine then that's probably easier! Will have to check out
pyink
in more detail, too, so thanks for that mention! 🙂
b
it's a fork of
black
with a couple of config options our codebase uses (2-space indents don't judge haha and "majority quotes").
which means, for existing files, if they're mostly using double-quotes, prefer to just be consistent rather than changing them all to single-quotes or vice-versa
g
Yeah; had a quick scan of it! I like black's uncompromising setup (and its default), but this alone would make me so happy:
b
yeah we have a couple of xooglers on the team so it makes us feel at home 😂
I also generally align with black being opinionated vs configurable. I prefer to avoid the team bikeshedding on style preferences.