summaryrefslogtreecommitdiff
path: root/pylint/checkers/classes.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Correct infered to inferredClaudiu Popa2019-05-201-12/+12
|
* Exclude ``__dict__`` from ``attribute-defined-outside-init``Claudiu Popa2019-05-191-0/+3
| | | | Close #2909
* Style - Apply isort on all apllicable filesPierre Sassoulas2019-03-201-16/+15
|
* ``assigning-non-slot`` not emitted for classes with unknown base classes.Claudiu Popa2019-03-111-35/+37
| | | | | | | | | It's possible to lint classes that don't have known bases (e.g. one of them might come from a C extension), in which case we cannot make a lot of assumptions about the class layout with respect to `__slots__`. As such, it's best to ignore these classes from this check. Close #2807
* Add missing check_messages() for visit_classdef in classes checksClaudiu Popa2019-03-031-0/+12
|
* Added a new check `class-variable-slots-conflict`Claudiu Popa2019-03-031-10/+21
| | | | | This check is emitted when ``pylint`` finds a class variable that conflicts with a slot name, which would raise a ``ValueError`` at runtime.
* Take into account `__class_getitem__` Pascal Corpet2019-02-041-1/+1
| | | | | | | | Take into account `__class_getitem__` from PEP 560 and fixes some false positives for `no-self-argument` and `unsubscriptable-object` PEP: https://www.python.org/dev/peps/pep-0560/ Close #2416
* Adding implicit-str-concat-in-sequence check (#1655)Lucas Cimon2018-10-101-9/+9
| | | | | ``implicit-str-concat-in-sequence`` detects string concatenation inside lists, sets & tuples. It would warn on code such as `('a', 'b' 'c')`.
* Reformat the code with blackClaudiu Popa2018-09-171-445/+634
|
* Infer decorated methods when looking for method-hiddenClaudiu Popa2018-08-231-9/+21
| | | | Close #2369
* Stop protected-access exception for missing class attributesBryce Guinta2018-08-081-0/+2
| | | | Skip Uninferable values from getattr
* Update copyright noticesClaudiu Popa2018-07-151-1/+7
|
* Merge branch 'master' into fix_2177Sushobhit2018-06-221-1/+1
|\
| * Use as_string() to get the representation of an annotation, not name, which ↵Claudiu Popa2018-06-211-1/+1
| | | | | | | | can be missing. Close #2210
* | adapt existing test cases for useless-object-inheritance.ssolanki2018-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* | Add new checker useless-object-inheritance.ssolanki2018-06-201-1/+8
|/ | | | Close #2177
* `mcs` as the first parameter of metaclass's `__new__` method was replaced by ↵Claudiu Popa2018-06-061-1/+1
| | | | | | `cls` Close #2028
* Fixed emitting ``useless-super-delegation`` when changing the default value ↵Ashley Whetter2018-06-021-2/+3
| | | | | | of keyword arguments Closes #2022
* Fixed method-hidden raised when assigned to data descriptorsAshley Whetter2018-06-011-0/+8
| | | | Closes #1061
* Remove unused functionClaudiu Popa2018-05-261-9/+0
|
* Kill YES in favour of UninferableClaudiu Popa2018-05-241-5/+5
|
* pyupgrade (#2136)Anthony Sottile2018-05-221-1/+1
|
* Don't emit 'useless-super-delegation' if annotations are differentBen Green2018-05-151-0/+11
| | | | Fixes #1923
* Fix lint errors caused by the new checker changeClaudiu Popa2018-04-021-3/+2
|
* Spelling fixesVille Skyttä2018-01-301-1/+1
|
* Rip some of the six imports from the codebaseClaudiu Popa2018-01-251-10/+9
|
* Set max-returns to 11Nick Drozd2018-01-041-21/+16
| | | | | | Previously, the greatest number of return statements in a function was 15 (checkers.typecheck). 11 is the lowest I could get it without aggressive rewriting.
* Regenerate copyright noticesClaudiu Popa2017-12-151-4/+16
|
* useless-super-delegation takes into account default values for the current ↵hippo912017-09-301-0/+96
| | | | | implementation A method can reimplement a super method in order to provide a different default value, in which case we shouldn't emit ``useless-super-delegation``.
* Skip the invalid-length-returned check when the return value is clearly an ↵Claudiu Popa2017-09-291-1/+8
| | | | int, but with an uninferable underlying value
* Adding a check for ``inconsistent-return-statements`` inside function or ↵hippo912017-09-261-4/+4
| | | | | methods. (#1641) Close #1267
* Add a couple of Uninferable filters where we weren't using anyClaudiu Popa2017-08-151-2/+2
|
* Fix line-too-longClaudiu Popa2017-06-031-1/+2
|
* Don't emit assigning-non-slot when reassigning the class with another class ↵Claudiu Popa2017-06-021-0/+12
| | | | that has the same layout. Close #1506
* Remove mentions of deprecated astroid node names (#1485)Łukasz Rogalski2017-05-221-4/+4
|
* Do not emit warning on type(self)._private_attribute access (#1288)Łukasz Rogalski2017-02-051-7/+26
| | | Closes #1031
* Change the text of arguments-differ by making it more explicitClaudiu Popa2016-12-301-1/+1
|
* Take in consideration the dummy-rgx-variable when checking for different ↵Claudiu Popa2016-12-301-16/+32
| | | | parameters. Close #1041
* Fix formatting and use any() to simplify the checkClaudiu Popa2016-12-181-12/+22
|
* Add new checker len-as-condition (#1154)Alexander Todorov2016-11-291-1/+1
| | | | | | * Add new checker len-as-condition * Fix len(SEQUENCE) warnings discovered by new checker
* Report when __slots__ is a simple string and not a non-string container (#1171)Anthony Foglia2016-11-241-0/+5
| | | | | | * Report when __slots__ is a simple string and not a non-string container * Update ChangeLog
* Don't try to access variables defined in a separate scope when checking for ↵Claudiu Popa2016-11-201-7/+26
| | | | protected-access. Close #1126
* Grammar fixClaudiu Popa2016-07-231-1/+1
|
* Exempt special methods from arguments-differ. Close #1042Claudiu Popa2016-07-231-1/+7
|
* Do not emit useless-super-delegation when having extraneous arguments in the ↵Claudiu Popa2016-07-231-1/+25
| | | | call site. Close #1043
* Use ClassDef.instantiate_class() (#1040)Florian Bruhin2016-07-231-1/+1
| | | | | | | | Otherwise we get this from astroid: .../pylint/pylint/checkers/classes.py:1112: PendingDeprecationWarning: ClassDef.instanciate_class() is deprecated and slated for removal in astroid 2.0, use ClassDef.instantiate_class() instead. instance = cls.instanciate_class()
* Even more granular copyrights (thanks to copyrite)Claudiu Popa2016-07-231-2/+8
|
* Keep a consistent copyright notice across the board.Claudiu Popa2016-07-191-0/+2
| | | | | This was changed automatically in #894, but apparently we need to have the copyright notice somewhere.
* Do not check for useless-super-delegation if the function is decoratedMoises Lopez - https://www.vauxoo.com/2016-07-171-0/+4
|
* Uninferable now has a false default value, so don't check it explicitly.Claudiu Popa2016-07-161-1/+1
|