https://pantsbuild.org/ logo
#general
Title
# general
f

fresh-architect-74417

04/10/2019, 10:52 PM
pylintrc.txt
💯 1
a

aloof-angle-91616

04/10/2019, 10:53 PM
we would probably be interested in a pull request if you'd like to turn this into one!
❤️ 1
thank you for providing this!
f

fresh-architect-74417

04/10/2019, 10:56 PM
Sure. However, it needs to be configured with some kind of CI server. Here at RapidSOS, we use codacy to enforce Pylint rules when engineers try to merge a PR. Codacy uses this pylintrc file and enforce the rule at merging. That prevents bad code from checking in.
I can send a PR for this to replace the current pylint rules.
a

aloof-angle-91616

04/10/2019, 11:00 PM
we have lint on our CI, we have a pretty intense set of linting that we've developed: https://github.com/pantsbuild/pants/tree/master/contrib/python/src/python/pants/contrib/python/checks/checker. we might be interested in more incremental changes, but it might be difficult to accept a single lint change at once which affects a large amount of the repo
f

faint-holiday-82821

04/10/2019, 11:04 PM
I've been expeirmenting w/ using
black
or
yapf
for my own codebases, what was the thought rolling your own linting vs one of those?
f

fresh-architect-74417

04/10/2019, 11:04 PM
😄
Pylint covers some of those.
This is nice.
a

aloof-angle-91616

04/10/2019, 11:06 PM
we don't actually roll our own, we extend pycodestyle i am p sure
f

faint-holiday-82821

04/10/2019, 11:06 PM
ahhh gotcha
a

aloof-angle-91616

04/10/2019, 11:06 PM
the ones we've developed are for things we just want to lint ourselves
i don't think there'd be pushback if another linter was better
h

hundreds-father-404

04/10/2019, 11:11 PM
I would love to use
black
. The main issue is
black
uses 4 spaces, and we need to allow 2 space indentation. We could use https://github.com/desbma/black-2spaces (fork) to get around this potentially, or maybe
yapf
a

aloof-angle-91616

04/10/2019, 11:13 PM
i have very negative feelings about a linter that requires 4 spaces, i really like how hackable our current setup is and how easy it is to develop new lints
h

hundreds-father-404

04/10/2019, 11:13 PM
Black is an opinionated auto- formatter, like Prettier. From what I can tell,
yapf
is more configurable
4 Views