-
Notifications
You must be signed in to change notification settings - Fork 16
add pylintrc file to each indicator #365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It looks like this is using an identical .pylintrc for all indicators; the following modules had existing .pylintrc that have been overwritten. Was that intentional?
|
too-many-arguments, | ||
# Allow pytest functions to be part of a class. | ||
no-self-use, | ||
# Allow pytest classes to have one test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't scoped just to the test dir right? so adding these lines to have tests lint correctly potentially allows these into the actual module code?
secondarily, how strongly do we feel we need to lint unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they would allow it into the module code, but they seem like narrow enough and innocuous enough problems that they could be caught in review.
If one uses an integrated linter in their IDE, it will read from these files and complain about the tests. FWIW we enforce style the same across implementation and test files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a huge fan of relying on code review to catch problems that could have been linted, but agree they're pretty innocuous. One option is to add an additional pylintrc to the tests module, so any weird test things can get captured without worrying about affecting the module code. Not sure how clean that is though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about doing this but thought it created a lot of lint files (2 per indicator rather than the necessary 1). Can do if you think it is worthwhile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea that's kind of annoying...I think they're pretty harmless for now, lets just leave as is.
Yes, I felt that we should have a consistent style across all indicators. |
Sounds good! In that case, would you do a pass through the ones below and make sure they lint successfully with the new configuration? Otherwise the next PR on their
|
A quick check for Specially, |
@krivard should I include the lint compliance changes in this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This should make the linter complain less about: