summaryrefslogtreecommitdiff
path: root/checkers/variables.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Use file_from_modpath instead of load_module_from_name.Claudiu Popa2014-01-301-2/+2
| | | | | --HG-- branch : all_false_positive
* Merge with default.Claudiu Popa2014-01-221-0/+6
|\ | | | | | | | | --HG-- branch : all_false_positive
| * Simplify check and enhance tests.Claudiu Popa2014-01-221-6/+3
| | | | | | | | | | --HG-- branch : nonlocal
| * Simplify the lookup for nonlocals.Claudiu Popa2014-01-141-24/+8
| | | | | | | | | | --HG-- branch : nonlocal
| * Enhance used-before-assignment check to look for nonlocal uses.Claudiu Popa2013-12-271-0/+25
| | | | | | | | | | --HG-- branch : nonlocal
* | Use symbolic name.Claudiu Popa2014-01-181-2/+4
| | | | | | | | | | --HG-- branch : all_false_positive
* | Remove missing-submodule, move test fixture inside test.Claudiu Popa2014-01-181-3/+2
| | | | | | | | | | --HG-- branch : all_false_positive
* | Add missing-submodule check for fixing issue #126.Claudiu Popa2014-01-031-3/+22
|/ | | | | --HG-- branch : all_false_positive
* fix unpacking-non-sequence false negative: detect that infered node **is an ↵Sylvain Thénault2013-12-201-27/+29
| | | | | | | | | instance** of an iterable class. Also, slightly enhance the message for it and its unbalanced-tuple-unpackaging cousin.
* fix indentation in various places. Damned googlers :pSylvain Thénault2013-12-041-12/+12
|
* Refactoring to allow the catching of InferenceErrors.Claudiu Popa2013-10-031-39/+44
| | | | | --HG-- branch : non_unpackable
* Don't show the original lineno if the infered node has no lineno.Claudiu Popa2013-09-031-4/+4
| | | | | --HG-- branch : non_unpackable
* Don't show the module if it is the same module.Claudiu Popa2013-09-031-6/+16
| | | | | --HG-- branch : non_unpackable
* Show the module information for unbalanced-tuple-unpacking and ↵Claudiu Popa2013-09-021-4/+8
| | | | | | | unpacking-non-sequence messages. --HG-- branch : non_unpackable
* Update message.Claudiu Popa2013-09-021-1/+1
| | | | | --HG-- branch : non_unpackable
* Add more context informations regarding the unpacked sequence location.Claudiu Popa2013-08-301-2/+4
| | | | | --HG-- branch : non_unpackable
* Check all the infered nodes for both unbalanced-tuple-unpacking and ↵Claudiu Popa2013-08-301-23/+19
| | | | | | | unpacking-non-sequence. --HG-- branch : non_unpackable
* Show the offending line for unpacking non sequences.Claudiu Popa2013-08-301-2/+3
| | | | | --HG-- branch : non_unpackable
* Make unpacking detection smarter by handling unpacking function calls.Claudiu Popa2013-08-281-11/+20
| | | | | --HG-- branch : non_unpackable
* Add new warning for unpacking non-sequences in assignment.Claudiu Popa2013-08-251-13/+32
| | | | | --HG-- branch : non_unpackable
* some pylint and style fixesSylvain Thénault2013-07-311-23/+18
|
* Add test cases for good cases, check the targets before the inference.Claudiu Popa2013-07-251-3/+4
| | | | | --HG-- branch : unpacking2
* Prefer the symbolic name.Claudiu Popa2013-07-241-1/+1
| | | | | --HG-- branch : unpacking2
* Infer the value before using it, accept astroid.List as well.Claudiu Popa2013-07-241-3/+8
| | | | | --HG-- branch : unpacking2
* Prefer the symbolic message.Claudiu Popa2013-07-211-1/+1
| | | | | --HG-- branch : unpacking2
* Add support for unbalanced tuple unpacking check.Claudiu Popa2013-07-211-0/+26
| | | | | --HG-- branch : unpacking2
* [variables checker] drop check_messages that trigger false positive when ↵Sylvain Thénault2013-07-081-3/+0
| | | | other messages from this checker are disabled (eg running --errors-only)
* Resolve conflict and take feed-back into account for PR #34Anthony Truchet2013-06-191-1/+6
|\
| * Add @check_messages(...) annotations to help not to spend time on unneeded ↵Anthony Truchet2013-06-181-1/+7
|/ | | | | | | | checks. We only add such annotations is reasonably simple cases. Some visit methods are quite involved and build a checker's state ; such methods are skipped in the first phase.
* Do not warn about redefinitions of dummy variables.Torsten Marek2013-06-181-1/+3
|
* Do not treat all variables starting with _ as dummy variables, only _.Torsten Marek2013-06-181-1/+1
|
* astng has been renamed astroidDavid Douard2013-06-171-30/+30
|
* use .fromlineno instead of .lineno (which is not reliable)Sylvain Thénault2013-02-251-2/+2
|
* Emit a warning if __all__ contains non-string objects.Torsten Marek2013-01-081-1/+5
| | | | Closes #112728
* Fixed a couple of bugs in the __all__ handling and added a newTorsten Marek2013-01-081-8/+16
| | | | | | | | | warning about non-string objects in __all__. Closes #112698 --HG-- branch : stable
* lint fixesSylvain Thénault2012-09-191-3/+3
|
* Closes #104572: symbolic warning names in output (by Martin Pool)Martin Pool2012-09-191-0/+16
| | | | triggered whatever the format using a command line option
* drop useless attribute from variables checkerSylvain Thénault2012-09-191-5/+0
|
* use .iter* version of dict methods when possibleSylvain Thénault2012-09-191-2/+2
|
* Add test and code for handling __all__ with pylint. Closes #4685.FELD Boris2012-09-191-2/+16
|
* Closes #93591: Correctly emit W0623 on multiple assignment of unpackable ↵Torsten Marek2012-06-071-5/+7
| | | | | | | | | | | | | exceptions eg for code like try: ... except AnyException as (here, there): ... Instead of warning about redefining tuple, recurse into the tuple and check all names.
* Detect assignments to a loop variable in the else branch of a for statement.Torsten Marek2011-11-171-1/+8
| | | | Closes: #9188,#4024
* Fix for #81078: Warn if names in exception handlers clobber overwrite ↵Sylvain Thénault2011-10-241-3/+12
| | | | existing names
* closes #74747: don't crash when lookup up a special attribute in class scopeSylvain Thénault2011-09-071-2/+9
| | | | (patch by google)
* closes #74087: handle case where inference of a module return YESSylvain Thénault2011-09-071-1/+3
| | | | | | | | | | | | | This avoid some cases of "TypeError: '_Yes' object does not support indexing" when conditionally assigning a nonexisting module to intermediate modules in a dotted name. This is only a cosmetic fix to avoid the crash, the actual fix probably needs a lot of work on the inference module to support conditional assignment and inspection of several places of assignment, rather than just the latest one. Probably not worth it, either. patch by Google
* closes #70495: absolute imports fail depending on module path (patch by ↵Sylvain Thénault2011-07-081-1/+2
| | | | Jacek Konieczny)
* performance: use 'active_msgs' attribute to disable function calls or the likeEmile Anclin2010-12-131-2/+10
|
* pylint itself: remove last pylint error messageEmile Anclin2010-12-131-3/+4
|
* cleanup: remove useless KeyboardInterrupt catch and have a print forEmile Anclin2010-12-091-4/+5
| | | | unhandled exception
* messages: decorate visit and leave methods with check_messagesEmile Anclin2010-12-091-3/+5
| | | | refactor checker/bases.py while adding 'check_messages'