summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Handle matrix-multiplication operator ("@")matmulSteven Myint2015-12-212-1/+9
| | | | | | https://docs.python.org/3.6/whatsnew/3.5.html#pep-465-a-dedicated-infix-operator-for-matrix-multiplication This fixes https://bugs.launchpad.net/pyflakes/+bug/1523163.
* Check feature names imported from futureJohn Vandenberg2015-11-253-0/+25
| | | | | As '*' does not appear in __future__.all_feature_names, this also reports an error on : from __future__ import *
* Allow __future__ in doctestJohn Vandenberg2015-11-252-12/+32
| | | | | Replaces plain attribute Checker.futuresAllowed with a property that supports __future__ in both module and doctest.
* Process doctest scope directly under the module scopeJohn Vandenberg2015-11-252-14/+71
| | | | | | | | | | | | | | | | | | | | | | | | Explicitly place the doctest directly under the module scope, instead of processing it while within the scope where the docstring was encountered. Also do not process doctest which are not processed by default according to the doctest documentation. The primary benefit of moving the doctest scope directly under the module scope is that it may be efficiently identified, as it may only appear second in the stack. However it also ensures that the doctest scope can not access names in scopes between the module scope and the object where the docstring was encountered. As it was, class scope rules prevented the doctest scope from accessing names in a class scope, however the doctest scope was able to access names in an outer function, if the doctest appeared in a nested function. Note that there was no real bug there, as the doctest module does not process doctest in nested functions (Python issue #1650090), so doctest appearing in nested functions are informational only. pyflakes previously inspected doctest in nested functions, and now these are ignored.
* Report each usage of star importsJohn Vandenberg2015-11-244-13/+82
| | | | Also detect unused star imports.
* Merge pull request #51 from jayvdb/assert-tupleJohn Vandenberg2015-11-243-1/+47
|\ | | | | Report assert using tuple
| * Report assert using tupleJohn Vandenberg2015-11-243-1/+47
|/ | | | | | This is a SyntaxWarning on Python 2.6+ Resolves lp:848467
* Fix undefined name in generators in classJohn Vandenberg2015-11-202-16/+36
| | | | | 8c8a27b8 provided a partial solution for generators in the class scope, however it did not account for generators enclosing other generators.
* Fix PyPyJohn Vandenberg2015-11-205-24/+114
|
* Python 3 only allows import * at module levelJohn Vandenberg2015-11-194-0/+34
|
* Merge test_doubleNestingReportsClosestNameJohn Vandenberg2015-11-162-20/+7
| | | | | | The test_doubleNestingReportsClosestName in test_doctest only differs by the expected line number of the error, which can be dynamically determined using TestCase.withDoctest.
* Import in Class is a public memberJohn Vandenberg2015-11-152-5/+23
| | | | | | An import in a class is a member of the class, and may be used outside the class scope, so it can not be marked as unused.
* Add contribution guidelines to READMEPhil Frost2015-11-131-0/+13
|
* Check for non-ast SyntaxErrorsnonastAaron Meurer2015-11-133-10/+772
| | | | | | | | | | | This includes return and yield outside of a function and break and continue outside of a loop. Fixes lp 1293654. The problem is that these SyntaxErrors are not encoded in the ast grammar, so they are not detected when just compiling to ast. You must compile down to bytecode to catch them. The advantage here is that we can still check for other kinds of errors in this case, because the ast is still valid.
* Add DoctestScopeJohn Vandenberg2015-11-123-6/+187
| | | | | | | Fix bug in 03ffc76 caused by determining the doctest global scope level based on whether parsing doctests was enabled. Also do not parse docstrings within doctests.
* Fix global removing all UndefinedNameJohn Vandenberg2015-11-122-3/+28
| | | | | | | 03ffc763 introduced better global support, however a logic error caused it to remove any previously detected UndefinedName whenever a global was encountered.
* PEP 498 f-strings supportJohn Vandenberg2015-11-082-1/+9
| | | | | PEP 498 f-strings cause pyflakes to crash with AttributeError: 'Checker' object has no attribute 'FORMATTEDVALUE'
* Fix documentation of Binding.usedJohn Vandenberg2015-11-031-2/+2
| | | | | ef4da24 changed the Binding.used tuple from (scope, line number) to (scope, node). This updates the docstring to reflect this change.
* Merge pull request #36 from pyflakes/typoSteven Myint2015-09-293-3/+3
|\ | | | | Fix typos
| * Fix typostypoSteven Myint2015-09-223-3/+3
| |
* | Merge pull request #35 from nikolas/patch-1Steven Myint2015-09-221-1/+1
|\ \ | | | | | | fix typo in readme
| * | fix typo in readmeNik Nyby2015-09-221-1/+1
|/ /
* | Increment version to 1.0.01.0.0Phil Frost2015-09-202-2/+2
| | | | | | | | | | Also declare Python 3.5 as supported in the README. We test 3.5 in CI now, and since 0.9.2 support for 3.5's new features have been added.
* | Merge pull request #34 from pyflakes/3.5Ian Cordasco2015-09-171-0/+1
|\ \ | |/ |/| Enable Python 3.5 on Travis CI
| * Enable Python 3.5 on Travis CI3.5Steven Myint2015-09-161-0/+1
|/
* Merge pull request #33 from alexandrul/masterIan Cordasco2015-09-071-4/+6
|\ | | | | Fix test_api.py on Windows
| * os.chmod() supports only read-only flag operations on WindowsEduard-Cristian Stefan2015-09-071-1/+2
| |
| * Use os.linesep for Windows compatibilityEduard-Cristian Stefan2015-09-071-3/+4
|/
* Remove broken badgebadge-1Steven Myint2015-08-311-4/+0
|
* Merge pull request #27 from ryneeverett/used-global-importPhil Frost2015-08-282-3/+14
|\ | | | | Don't report UnusedImport when binding global name
| * Don't report UnusedImport when binding global nameryneeverett2015-08-142-3/+14
| | | | | | | | | | When an import binds to a name declared global by the "global" statment, don't report it as unused.
* | Support Python 3.5 async/await statements for Pyflakes.Igor Davydenko2015-08-262-3/+58
|/
* Merge pull request #26 from ryneeverett/unused-reassigned-variablePhil Frost2015-08-142-0/+25
|\ | | | | | | | | | | | | Add tests to document hard to test cases It would be nice if shadowing an unused variable was an error, but this is quite difficult to implement in a way which does not also raise false positives in the context of loops.
| * Roll back changes, add comment, and skip the test.ryneeverett2015-08-143-8/+8
| |
| * Test that used variable in loop is considered usedryneeverett2015-08-141-0/+12
| |
| * Don't mark shadowing variable as 'used'.ryneeverett2015-08-133-6/+19
| | | | | | | | | | | | Shadowing a used variable should still potentially raise an UnusedVariable warning. Alter tests' expected results to agree with this premise.
* | Merge pull request #29 from pyflakes/flake8Steven Myint2015-08-141-2/+2
|\ \ | |/ |/| Avoid running flake8 under nightly
| * Avoid running flake8 under nightlySteven Myint2015-08-141-2/+2
|/ | | | PyPI's pep8 is not compatible with Python 3.5 yet.
* Merge pull request #24 from pyflakes/nightlySteven Myint2015-07-141-0/+1
|\ | | | | Test "nightly" version of Python
| * Test "nightly" version of PythonnightlySteven Myint2015-07-141-0/+1
|/ | | This allows us to test the Python 3.5 related changes I made previously.
* Fix a test under Python 3.5Steven Myint2015-07-101-2/+8
|
* Bump version to 0.9.20.9.20.9Phil Frost2015-06-172-1/+4
|
* Fix TypeError bug.ryneeverett2015-06-162-1/+10
| | | | The Binding.used property must be a tuple (unless it's False).
* Merge branch '0.9'Phil Frost2015-06-091-2/+13
|\ | | | | | | | | Conflicts: pyflakes/__init__.py
| * Update NEWS.txt with 0.9.0 and 0.9.1 releases0.9.1Phil Frost2015-06-092-3/+14
| |
* | Bump version to 0.9.1-prePhil Frost2015-05-311-2/+1
|/
* Increment version to 0.9.00.9.0Phil Frost2015-05-311-1/+1
|
* Add 'sudo: false' to .travis.ymlAaron Meurer2015-05-271-0/+1
| | | | | | This allows Travis to use the Docker container infrastructure, which should make builds start up faster. See http://docs.travis-ci.com/user/workers/container-based-infrastructure/
* Improve 'global' statement support.ryneeverett2015-04-273-4/+53
| | | | | Add declared globals to each scope in the scope stack to avoid erroneous UndefinedName errors when they are loaded.
* Don't crash with an AttributeError on WindowsPhil Frost2015-04-171-6/+29
| | | | | | | | Depending on the C library, some constants (like signal.SIGINT) might not be defined. The previous code attempted to avoid failures on invalid signals by catching the ValueError raised by signal.signal when given an invalid signal to handle, however failed to account for the possiblity of the signal not being defined at all.