Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix crash with 'in' operator on unneeded-not | Laura M?dioni | 2015-10-29 | 3 | -2/+9 |
| | |||||
* | improve NotChecker | Laura M?dioni | 2015-10-27 | 1 | -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 messages | Laura M?dioni | 2015-10-27 | 2 | -14/+14 |
| | | | | | - warning => convention - "One not too many" => "consider changing.." | ||||
* | Check for nots too many in comparison expressions | Laura M?dioni | 2015-10-26 | 4 | -1/+85 |
| | |||||
* | Ignore missing docstrings for decorated attribute setters and deleters | Michael Kefeder | 2015-11-19 | 2 | -0/+31 |
| | | | | Closes issue #651. | ||||
* | Cleanup pylint issues | Claudiu Popa | 2015-11-21 | 10 | -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 Popa | 2015-11-21 | 3 | -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 Popa | 2015-11-20 | 1 | -2/+2 |
| | |||||
* | Simplify the unflatten algorithm in order to not use NodeNG anymore. | Claudiu Popa | 2015-11-20 | 1 | -5/+7 |
| | |||||
* | Import has_known_bases and safe_infer back into pylint from astroid, until ↵ | Claudiu Popa | 2015-11-20 | 12 | -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 Popa | 2015-11-18 | 1 | -1/+1 |
|\ | | | | | | | error E0201 is obsolete - now E1101 | ||||
| * | error E0201 is obsolete - now E1101remove-E0201-references | Anentropic | 2015-11-18 | 1 | -1/+1 |
| | | |||||
* | | check the number of boolean expressions in if statement is reasonnable | Laura M?dioni | 2015-10-29 | 3 | -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 checker | Dmitry Pribysh | 2015-11-09 | 5 | -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 inference | Dmitry Pribysh | 2015-11-09 | 1 | -8/+24 |
| | | | | | | | | This way it won't infer all possibles values of a node, only two at most. | ||||
* | | fix get_type() | Laura M?dioni | 2015-11-06 | 1 | -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 checker | Dmitry Pribysh | 2015-11-07 | 3 | -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. | ||||
* | | Merge | Claudiu Popa | 2015-11-05 | 1 | -2/+13 |
|\ \ | |||||
| * | | display properties as attributes in pyreverse class diagram | spaceone | 2015-10-12 | 1 | -2/+13 |
| | | | |||||
* | | | Fix the test to work on both Python versions. | Claudiu Popa | 2015-11-04 | 1 | -1/+1 |
| | | | |||||
* | | | Add test for deques to `unsubscriptable-object` functional tests | Dmitry Pribysh | 2015-11-04 | 1 | -0/+6 |
| |/ |/| | |||||
* | | Add ChangeLog entry for too-many-nested-blocks and fix the errors in pylint. | Claudiu Popa | 2015-11-04 | 5 | -105/+109 |
| | | |||||
* | | Merged in lmedioni/pylint (pull request #298) | Claudiu Popa | 2015-11-04 | 3 | -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 implementation | Laura M?dioni | 2015-11-03 | 1 | -0/+7 |
| | | | | | | | | | | | | related to the issue #668 | ||||
| * | | add an extra sentence saying why blocks nesting is a bad pattern | Laura M?dioni | 2015-11-03 | 1 | -1/+2 |
| | | | | | | | | | | | | related to the issue #668 | ||||
| * | | also count if nodes from ifexp and list comprehension | Laura M?dioni | 2015-11-02 | 1 | -0/+7 |
| | | | | | | | | | | | | related to the issue #668 | ||||
| * | | check if the number of nested block in a function or a method isn't too high | Laura M?dioni | 2015-10-30 | 3 | -2/+202 |
| | | | | | | | | | | | | related to issue #668 | ||||
* | | | Fix pylint warning by rewriting part of BasicChecker | Dmitry Pribysh | 2015-11-03 | 1 | -4/+2 |
| | | | |||||
* | | | Rename 'unsubscriptable-value' message to 'unsubscriptable-object' | Dmitry Pribysh | 2015-11-03 | 3 | -32/+32 |
| | | | |||||
* | | | Add checker for unsubscriptable values used in subscript expression. | Dmitry Pribysh | 2015-11-03 | 5 | -2/+140 |
|/ / | | | | | | | Fixes issue #561. | ||||
* | | Fix an occurrence of no-classmethod-decorator. | Claudiu Popa | 2015-10-30 | 1 | -1/+1 |
| | | |||||
* | | Remove unused import. | Claudiu Popa | 2015-10-30 | 1 | -1/+1 |
| | | |||||
* | | Separe the conditions to improve the readability of the code. | Claudiu Popa | 2015-10-30 | 1 | -0/+4 |
| | | |||||
* | | Prefer any instead of for. | Claudiu Popa | 2015-10-30 | 1 | -4/+3 |
| | | |||||
* | | Fix the tests to work on both Python versions. | Claudiu Popa | 2015-10-30 | 2 | -2/+2 |
| | | |||||
* | | Merged in lmedioni/pylint (pull request #295) | Claudiu Popa | 2015-10-30 | 12 | -7/+131 |
|\ \ | | | | | | | | | | check for class methods declared without a decorator | ||||
| * | | no-static/class-method: enhance the tests and fix the code accordingly | Laura M?dioni | 2015-10-29 | 5 | -7/+24 |
| | | | |||||
| * | | improve style and fix typos regarding no_class/staticmethod_decorator | Laura M?dioni | 2015-10-29 | 3 | -4/+5 |
| | | | |||||
| * | | check for static methods declared without a decorator | Laura M?dioni | 2015-10-29 | 6 | -8/+44 |
| | | | | | | | | | | | | closes issue #675 | ||||
| * | | check for class methods declared without a decorator | Laura M?dioni | 2015-10-29 | 9 | -6/+76 |
| | | | | | | | | | | | | related to the issue #675 | ||||
* | | | Add a few functional tests for enhanced unpacking checkerenhance-unpacking-checker | Dmitry Pribysh | 2015-10-29 | 2 | -13/+36 |
| | | | |||||
* | | | Make tuple unpacking checker emit less false negatives | Dmitry Pribysh | 2015-10-29 | 3 | -142/+151 |
| | | | | | | | | | | | | By reusing functions from iterable checker. | ||||
* | | | Fix pylint warnings. | Claudiu Popa | 2015-10-27 | 1 | -4/+4 |
| | | | |||||
* | | | Merge heads. | Claudiu Popa | 2015-10-27 | 4 | -46/+164 |
|\ \ \ | |||||
| * | | | Add a new convention message, 'consider-using-enumerate' | Claudiu Popa | 2015-10-27 | 3 | -0/+113 |
| | | | | | | | | | | | | | | | | | | | | | | | | The message is emitted when code that uses `range` and `len` for iterating is encountered, which can be easily simplified by using `enumerate` instead. This makes the code a bit faster and cleaner. Closes issue #684. | ||||
| * | | | Move unidiomatic-typecheck into the comparison checker from base.py, since ↵ | Claudiu Popa | 2015-10-26 | 2 | -46/+51 |
| |/ / | | | | | | | | | | it makes more sense for it to be there. | ||||
* | | | Make iterable checker skip classes that are inferred to be abstractfix-685 | Dmitry Pribysh | 2015-10-27 | 7 | -25/+121 |
| | | | |||||
* | | | Skip not-an-iterable and similar checks for Base/Abstract classes | Dmitry Pribysh | 2015-10-27 | 2 | -84/+101 |
|/ / | | | | | | | | | | | And refactor iterable checker. Fixes issue #685. | ||||
* | | Simplify visit_compare, by moving the verifications for misplaced constants ↵ | Claudiu Popa | 2015-10-26 | 1 | -4/+4 |
| | | | | | | | | into their own if statement. | ||||
* | | Use the representation of the context when building the message for ↵ | Claudiu Popa | 2015-10-26 | 3 | -2/+4 |
| | | | | | | | | misplaced-comparison-constant. |