summaryrefslogtreecommitdiff
path: root/pylint
Commit message (Collapse)AuthorAgeFilesLines
* Control the maximum number of inference values from pylint with ↵Claudiu Popa2018-07-151-0/+7
| | | | --limit-inference-results
* Fix incorrect hanging indent detection for with statementsBryce Guinta2018-07-152-3/+14
| | | | | | | | Add with statement to recognized token keywords for format checker. Also recognize with statement as the start of a block to allow deeper indentation for hanging continuation Close #461
* Add docstring to _hanging_indent_after_bracketBryce Guinta2018-07-151-1/+10
|
* Rename pos to position to keep naming consistentBryce Guinta2018-07-151-6/+6
|
* Fix lint errorBryce Guinta2018-07-131-0/+2
| | | | astroid incorrectly inferring NoneType because of name reassignment
* Disable false-positive test message from changes in astroidBryce Guinta2018-07-132-1/+2
|
* Do not try to lower checker name if not setBryce Guinta2018-07-131-1/+2
|
* Return early when possible in typecheck call visitorNick Drozd2018-07-131-19/+21
| | | | This avoids doing unnecessary work in many cases.
* Avoid ancestors call in ABC check if possibleNick Drozd2018-07-131-3/+10
|
* Return early to avoid some nodes_of_class callsNick Drozd2018-07-131-0/+7
|
* Fix false positive unused-variable in lambda default arguments (#2276)Bryce Guinta2018-07-124-7/+7
| | | | | | | | | | The NameConsumer to_consume frame needed to be backed out by one so that for lambda bound default argument variables (closure) could consume the name in a higher scope (just like function default arguments) Close #1921 Close #1552 Close #1099 Close #210
* Fix false-postive undefined-variable in nested lambda. (#2274)Bryce Guinta2018-07-122-1/+13
| | | | | Remove unnecessary break in checker utils for lambdas causing parent lambdas to be ignored. Close #760
* Refactor duplicate code in is_defined_beforeBryce Guinta2018-07-111-5/+1
| | | | isinstance can take multiple tuples
* Fix lint errorClaudiu Popa2018-07-111-1/+1
|
* frozenset is an iterating context for dict.values() and friendsClaudiu Popa2018-07-101-1/+1
|
* `trailing-comma-tuple` can be emitted for `return` statements as well.Claudiu Popa2018-07-103-1/+11
| | | | Close #2269
* Filter with should_analyze_file in parallel mode (#2264)Randall Leeds2018-07-102-14/+21
| | | | | | | | | | Each ChildLinter receives a file path and instantiates a linter to check that file. As such, all files are arguments to child linters in parallel mode. Therefore, the check for should_analyze_file must happen in the parent linter, where knowledge of the original arguments is available. Expand the custom should_analyze_file test to exercise parallel mode. Close #1885
* Infer the value of the truth_value before looking for consider-using-ternary ↵Claudiu Popa2018-07-083-4/+18
| | | | | | | | | | and simplifiable-boolean-expression The reason for that is that a Name node, for instance, will not have a bool_value() implementation, thus it will default to returning Uninferable. In order to avoid that, just infer the object before verifying anything about it. Related to #2058
* Do not emit consider-using-ternary when all the elements involved are a ↵Claudiu Popa2018-07-082-0/+6
| | | | Compare node (might not be simplifiable to a ternary).
* Remove test that spends more than 60 seconds to run.Claudiu Popa2018-07-062-12613/+0
|
* Fix test errors from fixing astroid.as_string()Bryce Guinta2018-07-066-12/+12
|
* Check Slice is type index (fix #2252)Konstantin Manna2018-07-052-0/+4
|
* Prepare a new dev releaseClaudiu Popa2018-07-051-1/+1
|
* Emit consider-using-get only if the target is a Name, as this is the pattern ↵Claudiu Popa2018-07-052-0/+8
| | | | | | we try to detect Close #2254
* Fix lintClaudiu Popa2018-07-041-1/+3
|
* Only accept simple for-loop bodies when looking for consider-using-joinClaudiu Popa2018-07-042-5/+17
| | | | | | Also verify that the assignment targets are actually AssignName Close #2250
* Fix wrong continued indentation (bad-continuation) (#2244)Steven M. Vascellaro2018-07-031-6/+2
| | | Fixes a pylint warning for wrong continued indentation (bad-continuation)
* Add docstrings for naming style classes (#2245)Steven M. Vascellaro2018-07-031-0/+4
| | | Add docstrings for SnakeCaseStyle, CamelCaseStyle, PascalCaseStyle, and UpperCaseStyle
* `ImportFrom` nodes correctly use the full name for the import sorting checks.Claudiu Popa2018-07-033-6/+10
| | | | Close #2181
* Expand ignored-argument-names include starred arguments and keyword ↵Bryce Guinta2018-07-032-2/+25
| | | | arguments (#2237)
* Acknowledge that ellipses are allowed in typing annotations (#2236)Bryce Guinta2018-07-022-1/+8
| | | Prevents false-positive bad-whitespace message
* Fix of false positive ``ìnconsistent-return-statements`` (#2220)hippo912018-06-283-17/+27
| | | | | Correcting the way if statements are determined as return ended or not. Close #1782
* fix logic error in comment (#2217)Konstantin2018-06-281-1/+1
|
* Merge branch 'master' into fix_2177Sushobhit2018-06-2220-84/+153
|\
| * Use as_string() to get the representation of an annotation, not name, which ↵Claudiu Popa2018-06-212-2/+10
| | | | | | | | can be missing. Close #2210
| * Add a check `consider-using-set-comprehension` which is emitted if for set ↵Claudiu Popa2018-06-203-7/+26
| | | | | | | | | | | | initialization the old style with list comprehensions is used.
| * Use the latest astroidClaudiu Popa2018-06-201-1/+1
| |
| * [].extend and similar builtin operations don't emit `dict-*-not-iterating` ↵Claudiu Popa2018-06-202-0/+16
| | | | | | | | | | | | with the Python 3 porting checker Close #2187
| * Install the latest dev astroid to get typed_astClaudiu Popa2018-06-201-2/+2
| |
| * Add new checker 'consider-using-dict-comprehension' (#2204)Konstantin2018-06-203-2/+28
| | | | | | | | | | A new check is emitted for using old style dict initializations with list comprehensions instead of dict-comprehensions, which are faster and easier to read.
| * standardize help strings a bit (#2207)Mike Frysinger2018-06-2010-79/+79
| | | | | | | | | | | | | | A number of help strings are inconsistent in trailing periods, or spaces after them in the middle of text, or add a large amount of whitespace by using \ to continue the string. Standardize a lot of these so all help messages end in a period and there is normal whitespace in the middle.
* | adapt existing test cases for useless-object-inheritance.ssolanki2018-06-21144-144/+154
| | | | | | | | | | | | | | | | | | | | adapt existing test/input test cases to new check. add some more positive test case for useless-object-inheritance msg code was in conflict with existing msg. adapt existing test cases for new checker.
* | fix lint issue w.r.t useless-object-inheritance.ssolanki2018-06-206-9/+9
| |
* | Add new checker useless-object-inheritance.ssolanki2018-06-2018-27/+59
|/ | | | Close #2177
* Disable an insane linting errorClaudiu Popa2018-06-181-0/+1
|
* `logging-not-lazy` is emitted whenever pylint infers that a string is built ↵Claudiu Popa2018-06-183-6/+14
| | | | | | with addition Close #2193
* Add checker for simplifying chained comparison. Sushobhit2018-06-184-2/+134
| | | | | | | Add new checker "chained-comparison" which is used when pylint can detect that multiple comparisons can be squashed together into one. Close #2032
* Cut astroid.ReprNick Drozd2018-06-181-1/+1
| | | | This type of node doesn't exist in Python 3.
* Adapt the test to pass with the recent astroid changesClaudiu Popa2018-06-152-4/+10
|
* incorporate review comments.ssolanki2018-06-152-26/+16
|