Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fix elif-used rule | Laura M?dioni | 2015-11-30 | 1 | -18/+4 |
| | | | | The bug was introduced when porting the rule from pylint core to an extension | ||||
* | Fix a crash which occurred when old visit methods are encountered | Claudiu Popa | 2015-11-30 | 2 | -9/+26 |
| | | | | | | | | | | in plugin modules. If a plugin uses an old visit method (visit_class for instance), this can lead to a crash in pylint's base checkers, because the logic in the PylintASTWalker assumes that all checkers have a visit_class / leave_class method. The patch fixes this by looking for both names. Closes issue #711. | ||||
* | Don't emit unsubscriptable-object if the node is found inside an abstract ↵ | Claudiu Popa | 2015-11-30 | 2 | -0/+28 |
| | | | | class. Closes #685. | ||||
* | Add wrong-import-position to check_messages's decorator arguments for ↵ | Claudiu Popa | 2015-11-30 | 4 | -2/+38 |
| | | | | | | | | | | ImportChecker.leave_module This fixes an esoteric bug which occurs when ungrouped-imports and wrong-import-order are disabled and pylint is executed on multiple files. What happens is that without wrong-import-position in check_messages, leave_module will never be called, which means that the first non-import node from other files might leak into the current file, leading to wrong-import-position being emitted by pylint. | ||||
* | Don't use .iteritems, it doesn't exist on Python 3. Change some variable ↵ | Claudiu Popa | 2015-11-29 | 1 | -11/+8 |
| | | | | names and the name of the builtins module. | ||||
* | pylint extension to check for use of "else if" instead of "elsif" | Laura M?dioni | 2015-11-27 | 1 | -0/+76 |
| | | | | related to issue #673 | ||||
* | Add some more comments about the limitations of this rule | Laura M?dioni | 2015-11-24 | 2 | -3/+10 |
| | | | | related to issue #674 | ||||
* | Drop print | Laura M?dioni | 2015-11-24 | 1 | -2/+0 |
| | | | | related to issue #674 | ||||
* | Use a stack of dictionaries instead of 3 dicts | Laura M?dioni | 2015-11-24 | 3 | -30/+25 |
| | | | | | | | - This way it works with embedded classes and functions - Update the tests accordingly related to issue #674 | ||||
* | Remove test on str.split() since there is no support for inference on split ↵ | Laura M?dioni | 2015-11-24 | 2 | -11/+5 |
| | | | | | | for now related to issue #674 | ||||
* | check if the type of a variable is redefined (at a function, class or module ↵ | Laura M?dioni | 2015-10-30 | 7 | -4/+148 |
| | | | | | | scope) related to issue #674 | ||||
* | Added a new warning, 'unsupported-delete-operation' | Claudiu Popa | 2015-11-26 | 4 | -21/+150 |
| | | | | | It is emitted when item deletion is tried on an object which doesn't have this ability. Closes issue #592. | ||||
* | Added a new warning, 'unsupported-assignment-operation' | Claudiu Popa | 2015-11-26 | 4 | -9/+158 |
| | | | | | This is emitted when item assignment is tried on an object which doesn't have this ability. Closes issue #591. | ||||
* | Simplify the protocol methods, by using a common function. | Claudiu Popa | 2015-11-26 | 1 | -41/+12 |
| | |||||
* | Ignore multiple comparisons in unneeded-not rule | Laura M?dioni | 2015-11-25 | 2 | -0/+7 |
| | | | | related to issue #703 | ||||
* | Make some imports external instead of considering them local | Claudiu Popa | 2015-11-25 | 1 | -3/+3 |
| | | | | | | | | | The assumption that a module which can't be imported is local rather than external isn't always correct, since the implementation of the astroid's import system should always find a module which is local in the current package, while it isn't necessary true that it can find always external modules, which just might be missing. | ||||
* | Change the variable name to something more suggestive | Claudiu Popa | 2015-11-25 | 1 | -6/+7 |
| | |||||
* | Fix some docstrings and the Python 3 tests | Claudiu Popa | 2015-11-25 | 5 | -8/+10 |
| | |||||
* | Fix new import related errors in pylint's codebase. | Claudiu Popa | 2015-11-25 | 20 | -45/+51 |
| | |||||
* | Improve a bit wrong-import-position code and add comments | Laura M?dioni | 2015-11-24 | 1 | -7/+11 |
| | | | | related to issue #692 | ||||
* | Simplify a bit the algorithm checking for ungrouped imports | Laura M?dioni | 2015-11-24 | 1 | -12/+8 |
| | | | | related to issue #692 | ||||
* | Remove a chunk of code that was never executed | Laura M?dioni | 2015-11-23 | 1 | -3/+0 |
| | | | | related to issue #692 | ||||
* | Factorize code in _record_import method | Laura M?dioni | 2015-11-23 | 1 | -9/+13 |
| | | | | related to issue #692 | ||||
* | slightly change wrong-import-position message and add forgotten functional test | Laura M?dioni | 2015-11-12 | 3 | -2/+26 |
| | | | | related to issue #692 | ||||
* | Check imports are located at the top of the module (right after docstring ↵ | Laura M?dioni | 2015-11-10 | 41 | -62/+102 |
| | | | | | | and comments) related to issue #692 | ||||
* | Check imports are ordered (standard, 3rd party, local) and grouped by package | Laura M?dioni | 2015-11-09 | 13 | -9/+131 |
| | | | | related to issue #692 | ||||
* | Fix instances of unneeded-not in pylint's codebase. | Claudiu Popa | 2015-11-25 | 8 | -9/+8 |
| | |||||
* | Add is to the checked operators | Laura M?dioni | 2015-11-24 | 3 | -1/+4 |
| | |||||
* | 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 |
| | |