| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
I previously noticed the badge going awry. This explains it.
|
| |
|
|
|
|
|
|
|
|
| |
This also adds the latest version of Python.
The `setuptools` on Travis CI no longer supports Python 3.2:
https://github.com/pypa/setuptools/commit/b47fe15b9039a165589353a1a43f6dfe3bbe3a8e
https://travis-ci.org/myint/scspell/jobs/235721220#L146
|
| |
|
|\
| |
| |
| |
| | |
Forgot to push the commit that increments to 1.5.0 when I made the
release, and some changes have been made since then :(
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Don't test against file perms when running as root
test_permissionDenied tests file modes by creating a temporary file, then sets the mode to 0000 and attempts to process it and see if and permission denied error is generated. This never happens when the unit tests are run as root since it can open files regardless of file permissions.
* Fix up UID skip in tests for Windows
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Even though variable annotations in function scope aren't evaluated at
runtime it's still useful for static analysis tools to process them and
catch some issues (and not report some things that aren't issues).
Let's take the following code:
from typing import Any
def fun():
a: Any
Previously pyflakes would report Any to be unused:
test.py:1: 'typing.Any' imported but unused
With this patch it's no longer the case.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use the get-pip script to bootstrap pip and setuptools to pinned
versions for Python 3.2 compatibility.
PyPy3's latest Windows version only supports Python 3.2, so while Python
3.2 is EOL upstream, we're still testing against it and need to be able
to install our tooling (including pip and setuptools).
|
|/ |
|
|
|
|
|
|
| |
Without this change, code with annotated assignments is crashing pyflakes with
an attribute error (`object has no attribute 'ANNASSIGN'`).
Test plan: new tests introduced conforming to behavior described in the PEP.
|
| |
|
| |
|
|
|
|
|
| |
This was inconsistent with the other error messages. This is useful as
it allows easy detecting of the offending item for editor plugins by
simply searching in the message for quotes.
|
|
|
|
| |
format strings (PEP 498) defines a new AST node, JOINEDSTR which
contains a list of string expressions.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
IntegrationTests.test_errors is failing on Windows under PyPy2
as its stderr emits \r\r\n as the line separator.
Add AppVeyor testing for three PyPy releases.
Also add a test for the other more complex stderr message emitted
by the Reporter.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently the API test module has failures for TestMain class,
added in f0084592, on Windows as SysStreamCapturing is in
universal newlines mode while its super class IntegrationTests
is using a native console stream with newline=os.linesep.
Add Appveyor CI script as .appveyor.yml,
which can be selected in the Appveyor settings.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes lp:1560134
aec68a784 added module names to error messages,
however it caused a TypeError for relative imports
that do not specify a module such as:
from . import x
This fixes the TypeError, and also adds the necessary
leading dots for relative import error messages.
Add tests for various types of relative imports.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes a regression introduced by
2a698f87c02a43d4489e30481e9def14ed4b4431.
This would fail with a KeyError:
try:
pass
except Exception as e:
del e
Fixes lp:1578903
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fixes lp:1578051
aec68a7 added module names to error messages, which included
a new class SubmoduleImportation to handle the special case
of submodule imports. It correctly handled the case of
a submodule import occurring after the root module was imported,
but didnt handle the opposite case of the submodule import
occurring before the root module was imported.
|
|
|
| |
As discussed in #64
|
| |
|
|
|
| |
Add all versions to tox.ini
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to solve many corner cases related to imports,
more information is needed about each import.
This change creates two new classes:
- SubmoduleImportation
- ImportationFrom
And adds an optional parameter full_name to the super class
Importation.
Functionally, this change only improves existing error messages
to report the full imported name where previously an error
would include only the import alias.
|
| |
|
|\
| |
| | |
Allow passing args to main()
|
|/ |
|
|\
| |
| | |
Handle matrix-multiplication operator ("@")
|
|/
|
|
|
|
| |
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.
|
|
|
|
|
| |
As '*' does not appear in __future__.all_feature_names, this
also reports an error on : from __future__ import *
|
|
|
|
|
| |
Replaces plain attribute Checker.futuresAllowed with a property
that supports __future__ in both module and doctest.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Also detect unused star imports.
|
|\
| |
| | |
Report assert using tuple
|
|/
|
|
|
|
| |
This is a SyntaxWarning on Python 2.6+
Resolves lp:848467
|
|
|
|
|
| |
8c8a27b8 provided a partial solution for generators in the class scope,
however it did not account for generators enclosing other generators.
|
| |
|
| |
|
|
|
|
|
|
| |
The test_doubleNestingReportsClosestName in test_doctest only
differs by the expected line number of the error, which can
be dynamically determined using TestCase.withDoctest.
|