summaryrefslogtreecommitdiff
path: root/checkers/classes.py
Commit message (Collapse)AuthorAgeFilesLines
* Move all package files to a pylint package.Ionel Cristian Maries2015-02-141-982/+0
|
* Use all the inferred statements for the super-init-not-called check.Claudiu Popa2015-02-091-20/+21
| | | | | | | | | For the super-init-not-called check, ``next(expr.infer())`` was used, which returned as the first statement an YES node, which resulted in the node being skipped for processing. Inferring all the objects would have returned the actual classes for which the parent was indeed called. This patch changes that to a infer-all strategy, which should yield better results. Closes issue #389.
* Add the method names for the 'signature-differs' and 'argument-differs'Claudiu Popa2015-01-111-4/+8
| | | | | | warnings. Closes issue #433.
* Fix a false positive with invalid-slots-objects and unicode strings. Closes ↵Claudiu Popa2015-01-031-1/+1
| | | | issue #421.
* Use a mro traversal for finding abstract methods. Closes issue #415.Claudiu Popa2014-12-211-6/+13
| | | | | | | | | This patch adds a new unimplemented_abstract_methods in pylint.checkers.utils, which is used to obtain all the abstract methods which weren't implemented anywhere in the mro of a class. The code works now by traversing the mro, gathering all abstract methods encountered at each step and resolving the implemented ones through either definition or assignment. This disables a couple of false positives on classes with complex hierarchies.
* Check the return value of slots, it can be None.Claudiu Popa2014-12-051-0/+2
|
* Use the public method astroid.nodes.Class.is_subtype_of.Torsten Marek2014-11-221-6/+2
|
* _is_subtype_of needs a context.Claudiu Popa2014-11-221-2/+7
| | | | Probably, we should make context optional for _is_subtype_of.
* Documentation improvementsMichal Nowikowski2014-11-041-2/+2
| | | | | | | | | | | - added intros to features page, - fixed PyLint to Pylint in text, - improved ide-integration doc page, - updated pylintrc in examples and - regenerated pylint manual --HG-- branch : docs-improvements-2
* Add a new option, 'exclude-protected'.Claudiu Popa2014-10-281-2/+12
| | | | | This option can be used for excluding members from the protected-access warning. Closes issue #48.
* Use a defaultdict where it makes sense.Claudiu Popa2014-10-251-3/+4
|
* Don't emit 'assigning-non-slot' when the assignment is for a property.Claudiu Popa2014-10-151-1/+34
| | | | Closes issue #359.
* Add a new warning, 'inherit-non-class', emitted when a class inherits from ↵Claudiu Popa2014-09-121-2/+24
| | | | something which is not a class. Closes issue #331
* Modernize to the point of working for Python 2.7 stillBrett Cannon2014-08-291-6/+7
| | | | | --HG-- branch : python_6
* Fix a crash which ocurred while checking for 'method-hidden', when the ↵Claudiu Popa2014-08-231-1/+2
| | | | parent frame was something different than a function.
* Detect calls of the parent's __init__, through a binded super() call.Claudiu Popa2014-08-161-0/+11
|
* Don't emit 'protected-access' if the attribute is accessed using a property ↵Claudiu Popa2014-08-141-1/+18
| | | | defined at the class level.
* Cleanup.Claudiu Popa2014-08-081-8/+16
|
* Minor cleanup.Claudiu Popa2014-08-051-9/+8
|
* Don't emit 'attribute-defined-outside-init' if the attribute was set by a ↵Claudiu Popa2014-08-041-0/+33
| | | | function call in a defining method. Closes issue #192.
* linting pylintSylvain Thénault2014-07-251-41/+39
|
* Only emit attribute-defined-outside-init for definition within the same ↵Sylvain Thénault2014-07-251-1/+5
| | | | | | module as the offended class This avoids mangling the output in some cases
* Don't emit hidden-method message when the attribute has been monkey-patched,Sylvain Thénault2014-07-251-3/+7
| | | | | | you're on your own when you do that Closes http://www.logilab.org/ticket/36653
* Add 'assigning-non-slot' warning, which detects assignments to attributes ↵Claudiu Popa2014-07-101-1/+32
| | | | not defined in slots.
* Remove trailing whitespace.Claudiu Popa2014-07-011-1/+1
|
* Emit attribute-defined-outside-init for all cases, not just for the last ↵Claudiu Popa2014-07-011-21/+23
| | | | assignment. Closes issue #262.
* [classes checker] fix access-member-before-definition false negative wrt aug ↵Sylvain Thénault2014-04-151-0/+17
| | | | assign. Closes #164
* various cleanupsSylvain Thénault2014-04-151-5/+7
|
* Emit only symbolic names from the classes checker.Torsten Marek2014-04-101-30/+29
|
* Infer slots elements before attempting to validate them.Claudiu Popa2014-04-121-11/+18
|
* Remove empty-slots-object, define tuple with methods at the global level.Claudiu Popa2014-04-091-1/+2
| | | | | --HG-- branch : slots
* Merge with default.Claudiu Popa2014-04-091-1/+1
|\ | | | | | | | | --HG-- branch : slots
| * Merged in dpursehouse/pylint (pull request #88)Claudiu Popa2014-04-091-1/+1
| |\ | | | | | | | | | Better message for E0202
| | * Better message for E0202David Pursehouse2014-01-211-1/+1
| | |
* | | Verify all the infered slots, skip YES nodes from the values and other fixes.Claudiu Popa2014-04-091-36/+39
| | | | | | | | | | | | | | | --HG-- branch : slots
* | | Merge with default.Claudiu Popa2014-03-311-0/+3
|\ \ \ | |/ / | | | | | | | | | --HG-- branch : slots
| * | Do not warn about 'abstract-method' when the abstract method is implemented ↵Claudiu Popa2014-03-251-0/+3
| | | | | | | | | | | | | | | | | | | | | through assignment. Closes #155. --HG-- branch : issue155
* | | Add new checks for proper class slots.Claudiu Popa2014-03-311-1/+50
|/ / | | | | | | | | --HG-- branch : slots
* | Updated FSF address.Arun Persaud2014-02-231-1/+1
|/
* various pylint fixesSylvain Thénault2013-12-221-4/+4
|
* Fix argument check for variable arguments.Claudiu Popa2013-09-261-1/+4
| | | | | --HG-- branch : exit_context
* Add bad-context-manager check for __exit__ special method.Claudiu Popa2013-09-261-0/+12
| | | | | --HG-- branch : exit_context
* Update non-iterator-returned message.Claudiu Popa2013-09-021-1/+1
| | | | | --HG-- branch : iter
* Use NEXT_METHOD globally.Claudiu Popa2013-09-021-6/+5
| | | | | --HG-- branch : iter
* Check only for next method.Claudiu Popa2013-08-301-7/+6
| | | | | --HG-- branch : iter
* Add check for non-iterator returned by __iter__.Claudiu Popa2013-08-081-1/+37
| | | | | --HG-- branch : iter
* astng has been renamed astroidDavid Douard2013-06-171-34/+34
|
* erroneous W0212 (access to protected member) on super call. Closes #115580Martin Pool2013-01-081-1/+6
| | | | | --HG-- branch : stable
* Fixes a crash when an __init__ method in a base class has been created by ↵Torsten Marek2012-11-121-2/+2
| | | | | | | assignment rather than direct function definition. Closes #110853 --HG-- branch : stable
* Closes #104572: symbolic warning names in output (by Martin Pool)Martin Pool2012-09-191-0/+21
| | | | triggered whatever the format using a command line option