-
Notifications
You must be signed in to change notification settings - Fork 11
Fix lambda_func and operators #83
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
pylintrc
Outdated
|
|
||
| # Maximum number of public methods for a class (see R0904). | ||
| max-public-methods=20 | ||
| max-public-methods=22 |
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.
TestGoogleStyleGuideChecker now has 21 public methods; this class should be refactored in a future PR and this max lowered (#84).
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.
Why up the limit here instead of adding a # pylint: disable=... directive in the relevant file?
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.
Ideally I'd set the max public methods for that one class to 21 temporarily. Reconsidering, maybe a global change is a bad idea. Opting instead for a local one.
sabidib
left a comment
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
Problem
We're missing a few binary operators and there are a few situations when
node.body.operanddoesn't have a name during the check for whether we can use an operator function as opposed to a lambda function, e.g.:Linting
lambda key: not type_allowed(key._type)throwsLinting
lambda key: not self.OUTPUT[key]["nullable"]throwsLinting
lambda job: not job.is_loaderthrowsSolution
This PR:
geton the dictionary of them to prevent future exceptions from being thrown (resulting in potential false negatives for operators that aren't included, bugs can be reported to add them)