summaryrefslogtreecommitdiff
path: root/pylint/test
Commit message (Collapse)AuthorAgeFilesLines
* Added a new warning, 'unsupported-delete-operation'Claudiu Popa2015-11-262-0/+111
| | | | | 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 Popa2015-11-262-0/+111
| | | | | This is emitted when item assignment is tried on an object which doesn't have this ability. Closes issue #591.
* Ignore multiple comparisons in unneeded-not ruleLaura M?dioni2015-11-251-0/+4
| | | | related to issue #703
* Fix some docstrings and the Python 3 testsClaudiu Popa2015-11-254-5/+5
|
* Fix new import related errors in pylint's codebase.Claudiu Popa2015-11-254-5/+3
|
* slightly change wrong-import-position message and add forgotten functional testLaura M?dioni2015-11-122-0/+24
| | | | related to issue #692
* Check imports are located at the top of the module (right after docstring ↵Laura M?dioni2015-11-1039-61/+65
| | | | | | and comments) related to issue #692
* Check imports are ordered (standard, 3rd party, local) and grouped by packageLaura M?dioni2015-11-0912-8/+48
| | | | related to issue #692
* Add is to the checked operatorsLaura M?dioni2015-11-242-0/+3
|
* Fix crash with 'in' operator on unneeded-notLaura M?dioni2015-10-292-1/+6
|
* improve unneeded-not messagesLaura M?dioni2015-10-271-12/+12
| | | | | - warning => convention - "One not too many" => "consider changing.."
* Check for nots too many in comparison expressionsLaura M?dioni2015-10-263-1/+54
|
* Ignore missing docstrings for decorated attribute setters and deletersMichael Kefeder2015-11-191-0/+19
| | | | Closes issue #651.
* Added a new refactoring warning, 'simplifiable-if-statement'Claudiu Popa2015-11-212-0/+124
| | | | | | | | | | | | | | 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.
* check the number of boolean expressions in if statement is reasonnableLaura M?dioni2015-10-292-0/+24
| | | | | | | --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-094-26/+34
| | | | | | | | | | | | | | | | 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.
* Reduce number of false positives emitted by non-iterator-returned checkerDmitry Pribysh2015-11-072-13/+17
| | | | | | | | 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.
* 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
|
* Merged in lmedioni/pylint (pull request #298)Claudiu Popa2015-11-042-0/+97
|\ | | | | | | check if the number of nested block in a function or a method isn't too high
| * check if the number of nested block in a function or a method isn't too highLaura M?dioni2015-10-302-0/+97
| | | | | | | | related to issue #668
* | Rename 'unsubscriptable-value' message to 'unsubscriptable-object'Dmitry Pribysh2015-11-032-28/+28
| |
* | Add checker for unsubscriptable values used in subscript expression.Dmitry Pribysh2015-11-033-1/+99
|/ | | | Fixes issue #561.
* 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-3011-4/+88
|\ | | | | | | check for class methods declared without a decorator
| * no-static/class-method: enhance the tests and fix the code accordinglyLaura M?dioni2015-10-294-3/+21
| |
| * improve style and fix typos regarding no_class/staticmethod_decoratorLaura M?dioni2015-10-292-2/+2
| |
| * check for static methods declared without a decoratorLaura M?dioni2015-10-295-3/+32
| | | | | | | | closes issue #675
| * check for class methods declared without a decoratorLaura M?dioni2015-10-298-3/+40
| | | | | | | | related to the issue #675
* | Add a few functional tests for enhanced unpacking checkerenhance-unpacking-checkerDmitry Pribysh2015-10-292-13/+36
| |
* | Merge heads.Claudiu Popa2015-10-272-0/+44
|\ \
| * | Add a new convention message, 'consider-using-enumerate'Claudiu Popa2015-10-272-0/+44
| |/ | | | | | | | | | | 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.
* | Make iterable checker skip classes that are inferred to be abstractfix-685Dmitry Pribysh2015-10-274-13/+105
| |
* | Skip not-an-iterable and similar checks for Base/Abstract classesDmitry Pribysh2015-10-271-1/+23
|/ | | | | | And refactor iterable checker. Fixes issue #685.
* Use the representation of the context when building the message for ↵Claudiu Popa2015-10-262-0/+3
| | | | misplaced-comparison-constant.
* Don't emit misplaced-comparison-constant for constant tests, such as true == ↵Claudiu Popa2015-10-262-10/+4
| | | | true, which should be handled by other checks.
* Make misplaced-comparison-constant a convention, rather than a warning.Claudiu Popa2015-10-262-4/+4
|
* Merge heads.Claudiu Popa2015-10-2612-30/+88
|\
| * Explicitely check for const to const comparisonLaura M?dioni2015-10-262-6/+27
| | | | | | | | Also add a check for comparison to a method, a function or an attribute and improve the functional test accordingly.
| * add a new rule looking for yoda conditionsLaura M?dioni2015-10-1512-30/+67
| |
* | Add test for verifying that __name__ can't be accessed from an instance.Claudiu Popa2015-10-262-0/+7
| |
* | Add test case for issue #559. Closes issue #559.Claudiu Popa2015-10-241-0/+7
| |
* | Don't warn about abstract classes instantiated in their own body. Closes ↵Claudiu Popa2015-10-211-0/+20
| | | | | | | | issue #627.
* | Obsolete options are not present by default in the generated configuration file.Claudiu Popa2015-10-201-0/+6
| | | | | | | | Closes issue #632.
* | non-iterator-returned can detect classes with iterator-metaclasses.Claudiu Popa2015-10-202-7/+43
| | | | | | | | Closes issue #679.
* | Add checker for membership rules and testsmembership-test-checkerDmitry Pribysh2015-10-198-0/+176
| | | | | | | | | | | | | | | | Idea of checking is very simple: value used to the right of the 'in' operator should support membership test protocol (i.e. define either __contains__ or __iter__ or __getitem__). Fixes issue #589.
* | Change the numeric ids of the new checkers.Claudiu Popa2015-10-181-0/+2
| |
* | Merge with defaultiterable-checkerDmitry Pribysh2015-10-1821-1/+313
|\ \
| * | Make iterable/mapping checker more smart and refactor it.Dmitry Pribysh2015-10-1516-15/+145
| | | | | | | | | | | | | | | Now it ignores errors inside mixins declarations and is able to recognize iterable/mapping metaclasses.
| * | Remove redundant unittests for iterable checkerDmitry Pribysh2015-10-081-135/+0
| | |