summaryrefslogtreecommitdiff
path: root/pylint/checkers/classes.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix new import related errors in pylint's codebase.Claudiu Popa2015-11-251-2/+3
|
* Fix instances of unneeded-not in pylint's codebase.Claudiu Popa2015-11-251-1/+1
|
* Cleanup pylint issuesClaudiu Popa2015-11-211-9/+6
| | | | | | | | | | | 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.
* Import has_known_bases and safe_infer back into pylint from astroid, until ↵Claudiu Popa2015-11-201-5/+5
| | | | | | | | | 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.
* Refactor non-iterator-returned checker to use safe inferenceDmitry Pribysh2015-11-091-8/+24
| | | | This way it won't infer all possibles values of a node, only two at most.
* Reduce number of false positives emitted by non-iterator-returned checkerDmitry Pribysh2015-11-071-4/+7
| | | | | | | | 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.
* Separe the conditions to improve the readability of the code.Claudiu Popa2015-10-301-0/+4
|
* Prefer any instead of for.Claudiu Popa2015-10-301-4/+3
|
* Merged in lmedioni/pylint (pull request #295)Claudiu Popa2015-10-301-3/+43
|\ | | | | | | check for class methods declared without a decorator
| * no-static/class-method: enhance the tests and fix the code accordinglyLaura M?dioni2015-10-291-4/+3
| |
| * improve style and fix typos regarding no_class/staticmethod_decoratorLaura M?dioni2015-10-291-2/+3
| |
| * check for static methods declared without a decoratorLaura M?dioni2015-10-291-5/+12
| | | | | | | | closes issue #675
| * check for class methods declared without a decoratorLaura M?dioni2015-10-291-3/+36
| | | | | | | | related to the issue #675
* | Make iterable checker skip classes that are inferred to be abstractfix-685Dmitry Pribysh2015-10-271-10/+1
|/
* non-iterator-returned can detect classes with iterator-metaclasses.Claudiu Popa2015-10-201-11/+27
| | | | Closes issue #679.
* Rename checking function for 'super()' call checking and update Changelog.fix-667Dmitry Pribysh2015-10-181-2/+2
|
* Make `no-self-use` checker not throw a warning if method has a `super()` call.Dmitry Pribysh2015-10-171-1/+10
| | | | | | | This is only enabled for python 3.0+ and only for `super` calls with no arguments. Fixes issue #667.
* Don't emit 'assigning-non-slot' for descriptors. Closes issue #652.Claudiu Popa2015-10-041-0/+23
|
* Use the new node names for the visit and leave methodsClaudiu Popa2015-08-261-7/+7
| | | | | Also, emit a PendingDeprecationWarning if the old names are still used, this support being removed in pylint 2.0.
* Update pylint to use the new astroid AST names and methodsClaudiu Popa2015-08-251-30/+28
| | | | | | | Also improve a couple of imports and added support for the old visit_ names. Priority will have the old visit_ names, such as visit_discard over visit_expr, visit_callfunc over visit_call etc.
* Don't emit no-init if not all the bases from a class are known.Claudiu Popa2015-07-221-1/+1
| | | | Closes issue #604.
* Use safe_infer and has_known_bases from astroid.helpers. Closes issue #593.Claudiu Popa2015-07-061-3/+4
|
* Detect a couple of objects which can't be base classes (bool, slice, range ↵Claudiu Popa2015-06-251-1/+8
| | | | and memoryview, which weren't detected until now).
* Fix a false positive regarding staticmethods: they don't have an implicit ↵Claudiu Popa2015-06-151-2/+1
| | | | argument when 'bounded'.
* Remove trailing whitespace.Claudiu Popa2015-06-141-3/+3
|
* arguments-differ understand differences between various type of functions.Claudiu Popa2015-06-141-6/+32
| | | | | This patch improves the way how arguments-differ understands the differences between classmethods, staticmethods and properties. Closes issue #548.
* Pylint understand super calls.Claudiu Popa2015-05-281-0/+3
|
* Fix some pylint warnings over pylint's codebase.Claudiu Popa2015-05-161-3/+3
|
* Remove trailing whitespaces.Claudiu Popa2015-05-141-3/+3
|
* Remove 'bad-context-manager' due to the inclusion of ↵Claudiu Popa2015-05-141-19/+2
| | | | 'unexpected-special-method-signature'.
* Add a new warning 'unexpected-special-method-signature'.Claudiu Popa2015-05-141-3/+58
| | | | | This is emitted when a special method (dunder method) doesn't have the expected signature, which can lead to actual errors in the application code. Closes issue #253.
* Don't emit attribute-defined-outside-init and ↵Claudiu Popa2015-05-121-1/+9
| | | | | | | | access-member-before-definition for mixin classes. Actual errors can occur in mixin classes, but this is controlled by the ignore-mixin-members option, so if something is a legitimate error, then the user can pass --ignore-mixin-members=no in order to check these in mixin classes as well. Closes issue #412.
* Cleanup.Claudiu Popa2015-05-111-6/+6
|
* Move non-iterator-returned to a new checker, SpecialMethodsChecker, which ↵Claudiu Popa2015-05-101-26/+46
| | | | has checks for structural checking of special methods.
* Remove unused imports.Claudiu Popa2015-05-071-1/+0
|
* Make ignore-iface-methods a noop option, mark it as deprecated.Claudiu Popa2015-05-051-15/+5
|
* Remove the rest of interface checks.Claudiu Popa2015-05-051-74/+4
| | | | | | | The removed checks are interface-is-not-class, missing-interface-method, unresolved-interface. The reason is that its better to start recommending ABCs instead of the old Zope era of interfaces.
* Add two new warnings, duplicate-bases and inconsistent-mro.Claudiu Popa2015-05-031-1/+21
| | | | | | duplicate-bases is emitted when a class has the same bases listed more than once in its bases definition, while inconsistent-mro is emitted when no sane mro hierarchy can be determined. Closes issue #526.
* Don't warn about no-self-use for builtin properties.Claudiu Popa2015-04-061-1/+2
|
* Add Changelog entry and cleanup after changeset 2307df9Claudiu Popa2015-03-311-2/+0
|
* Promote a couple of warnings to errors.Claudiu Popa2015-03-201-2/+3
| | | | | | | | These warnings were promoted since they could uncover potential bugs in the code and since most people are using `pylint -E` anyway, it's good to have them as errors. These warnings are: assignment-from-none, unbalanced-tuple-unpacking, unpacking-non-sequence, non-iterator-returned. Closes issue #388.
* Fix a couple of doc warnings, use string continuation.Claudiu Popa2015-03-021-43/+43
|
* Move all package files to a pylint package.Ionel Cristian Maries2015-02-141-0/+982