summaryrefslogtreecommitdiff
path: root/pylint
Commit message (Collapse)AuthorAgeFilesLines
* Change the variable name to something more suggestiveClaudiu Popa2015-11-251-6/+7
|
* Fix some docstrings and the Python 3 testsClaudiu Popa2015-11-255-8/+10
|
* Fix new import related errors in pylint's codebase.Claudiu Popa2015-11-2520-45/+51
|
* Improve a bit wrong-import-position code and add commentsLaura M?dioni2015-11-241-7/+11
| | | | related to issue #692
* Simplify a bit the algorithm checking for ungrouped importsLaura M?dioni2015-11-241-12/+8
| | | | related to issue #692
* Remove a chunk of code that was never executedLaura M?dioni2015-11-231-3/+0
| | | | related to issue #692
* Factorize code in _record_import methodLaura M?dioni2015-11-231-9/+13
| | | | related to issue #692
* slightly change wrong-import-position message and add forgotten functional testLaura M?dioni2015-11-123-2/+26
| | | | related to issue #692
* Check imports are located at the top of the module (right after docstring ↵Laura M?dioni2015-11-1041-62/+102
| | | | | | and comments) related to issue #692
* Check imports are ordered (standard, 3rd party, local) and grouped by packageLaura M?dioni2015-11-0913-9/+131
| | | | related to issue #692
* Fix instances of unneeded-not in pylint's codebase.Claudiu Popa2015-11-258-9/+8
|
* Add is to the checked operatorsLaura M?dioni2015-11-243-1/+4
|
* Fix crash with 'in' operator on unneeded-notLaura M?dioni2015-10-293-2/+9
|
* improve NotCheckerLaura M?dioni2015-10-271-5/+8
| | | | | - move reverse_op declaration out of visit_unaryop - build message out of operand, instead of using replace() on node.as_string()
* improve unneeded-not messagesLaura M?dioni2015-10-272-14/+14
| | | | | - warning => convention - "One not too many" => "consider changing.."
* Check for nots too many in comparison expressionsLaura M?dioni2015-10-264-1/+85
|
* Ignore missing docstrings for decorated attribute setters and deletersMichael Kefeder2015-11-192-0/+31
| | | | Closes issue #651.
* Cleanup pylint issuesClaudiu Popa2015-11-2110-39/+22
| | | | | | | | | | | This changeset also brings a couple of changes: * rrheaders and rcheaders are dropped from html_writer.Table's constructor. They weren't used at all and it was dead code. This simplified some if statements. * _is_attribute_property is used to look for a property assignment instead on relying on a different implementation.
* Added a new refactoring warning, 'simplifiable-if-statement'Claudiu Popa2015-11-213-1/+207
| | | | | | | | | | | | | | This is used when an if statement could be reduced to a boolean evaluation of its test, as seen in this example: if some_cond: return True else: return False could be reduced to `return bool(some_cond)` Closes issue #698.
* Use the correct module.Claudiu Popa2015-11-201-2/+2
|
* Simplify the unflatten algorithm in order to not use NodeNG anymore.Claudiu Popa2015-11-201-5/+7
|
* Import has_known_bases and safe_infer back into pylint from astroid, until ↵Claudiu Popa2015-11-2012-74/+106
| | | | | | | | | the latter stabilizes its API. Currently astroid goes into a total revamp, having a couple of development branches with partially incompatible APIs, which means that pylint can't rely on the exact location of has_known_bases and safe_infer until astroid reaches a new major release. With this in mind, these two functions are backported in pylint again.
* Merged in anentropic/pylint/remove-E0201-references (pull request #303)Claudiu Popa2015-11-181-1/+1
|\ | | | | | | error E0201 is obsolete - now E1101
| * error E0201 is obsolete - now E1101remove-E0201-referencesAnentropic2015-11-181-1/+1
| |
* | check the number of boolean expressions in if statement is reasonnableLaura M?dioni2015-10-293-2/+66
| | | | | | | | | | | | | | --max-bool-expr option allows to configure it (by default, up to 5 are tolerated) closes issue #677
* | Use safe inference in unpacking-non-sequence checkerDmitry Pribysh2015-11-095-27/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, this fix means that we won't be able to emit an error for cases like this one: ``` def foo(): if True: return [1, 2] return [3, 4, 5] a, b = foo() ``` Well, not unless we get flow-sensitive inference. But we still need this fix to reduce the number of false-positive errors. Fixes issue #695.
* | Refactor non-iterator-returned checker to use safe inferenceDmitry Pribysh2015-11-091-8/+24
| | | | | | | | This way it won't infer all possibles values of a node, only two at most.
* | fix get_type()Laura M?dioni2015-11-061-1/+1
| | | | | | | | | | It returned erroneous number of comment lines. tok_type is set just once, here one must look at the current token
* | Reduce number of false positives emitted by non-iterator-returned checkerDmitry Pribysh2015-11-073-17/+24
| | | | | | | | | | | | | | | | By disabling checker for cases when there're multiple possible values infered for node. This way we lose some of the inference power, but throw a lot less false positives. Fixes issue #695.
* | MergeClaudiu Popa2015-11-051-2/+13
|\ \
| * | display properties as attributes in pyreverse class diagramspaceone2015-10-121-2/+13
| | |
* | | Fix the test to work on both Python versions.Claudiu Popa2015-11-041-1/+1
| | |
* | | Add test for deques to `unsubscriptable-object` functional testsDmitry Pribysh2015-11-041-0/+6
| |/ |/|
* | Add ChangeLog entry for too-many-nested-blocks and fix the errors in pylint.Claudiu Popa2015-11-045-105/+109
| |
* | Merged in lmedioni/pylint (pull request #298)Claudiu Popa2015-11-043-2/+217
|\ \ | | | | | | | | | check if the number of nested block in a function or a method isn't too high
| * | some more comments for too-many-nested-blocks rule implementationLaura M?dioni2015-11-031-0/+7
| | | | | | | | | | | | related to the issue #668
| * | add an extra sentence saying why blocks nesting is a bad patternLaura M?dioni2015-11-031-1/+2
| | | | | | | | | | | | related to the issue #668
| * | also count if nodes from ifexp and list comprehensionLaura M?dioni2015-11-021-0/+7
| | | | | | | | | | | | related to the issue #668
| * | check if the number of nested block in a function or a method isn't too highLaura M?dioni2015-10-303-2/+202
| | | | | | | | | | | | related to issue #668
* | | Fix pylint warning by rewriting part of BasicCheckerDmitry Pribysh2015-11-031-4/+2
| | |
* | | Rename 'unsubscriptable-value' message to 'unsubscriptable-object'Dmitry Pribysh2015-11-033-32/+32
| | |
* | | Add checker for unsubscriptable values used in subscript expression.Dmitry Pribysh2015-11-035-2/+140
|/ / | | | | | | Fixes issue #561.
* | Fix an occurrence of no-classmethod-decorator.Claudiu Popa2015-10-301-1/+1
| |
* | Remove unused import.Claudiu Popa2015-10-301-1/+1
| |
* | Separe the conditions to improve the readability of the code.Claudiu Popa2015-10-301-0/+4
| |
* | Prefer any instead of for.Claudiu Popa2015-10-301-4/+3
| |
* | Fix the tests to work on both Python versions.Claudiu Popa2015-10-302-2/+2
| |
* | Merged in lmedioni/pylint (pull request #295)Claudiu Popa2015-10-3012-7/+131
|\ \ | | | | | | | | | check for class methods declared without a decorator
| * | no-static/class-method: enhance the tests and fix the code accordinglyLaura M?dioni2015-10-295-7/+24
| | |
| * | improve style and fix typos regarding no_class/staticmethod_decoratorLaura M?dioni2015-10-293-4/+5
| | |