| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Most of the problems with our logic were due to not having the same
logic as our exclude parameter. This refactors that out into a separate
function so we can confidently achieve that.
|
| |
|
|
|
|
|
|
|
| |
This adds support for rules that ignore violation codes on a per-file
basis. This takes a similar functional approach to
https://github.com/snoack/flake8-per-file-ignores which allows for glob
patterns like the `--exclude` option.
Closes #156
|
| |
|
|
|
| |
Instead of just using Flake8 and pylint to keep Flake8 clean, let's also
use black to make it less manual for clean-up.
|
| |
|
|
|
| |
By slightly modifying our utility function to parse comma separated
lists we can parse local plugins similar to other configuration options.
|
| |
|
|
| |
Closes #329
|
| |
|
|
|
|
|
| |
When we parse out our comma separated lists, we should ignore empty
strings to avoid them breaking users' expectations.
Closes #330
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When we read in a file on Python 3, we use the tokenize module to detect
the coding pragma at the top of the file. We then use that to decode the
rest of the file. However, when we were receiving stdin, we would not do
that.
This updates ``stdin_get_value`` in a backwards compatible way to check
for that coding pragma and then fall back to UTF-8 if necessary.
Closes #306
|
| |
|
|
|
|
|
|
| |
Due to https://bugs.python.org/issue27649, we cannot continue to
expect multiprocessing to work as we expect and document it on Windows.
As such, we are going to revert back to our previous behaviour of
disabling it across all versions of Python on Windows to provide the
default expected behaviour of Flake8 on that Operating System.
|
| |
|
|
|
| |
As FichteFoll pointed out on IRC, this line could include Python 3s
less than 3.2 as well.
|
| |
|
|
|
|
|
| |
In the case where alternate separator is None, we use '' which will
always be in any string. We want to skip that case.
Also we only run our tests on AppVeyor, not all of our testenvs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When normalizing paths, we want to handle the following cases:
- Someone is using a Windows-style path on Windows
- Someone is using a Unix style path on Unix
- Someone is using a Unix style path on Windows
os.path.sep will handle the native directory separator character while
os.path.altsep (when set) will handle alternate separators. Further,
os.path.abspath does the right thing on Windows when handed a Unix-style
path.
Related to #175
|
| |
|
|
|
|
|
|
| |
This simplifies the changes, reduces the scope of refactors apparently
for refactoring's sake and ensures that the internals are reasonable.
It also airs on the side of preserving information rather than
discarding or overwriting it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
For the sake of IDEs, check filename for exclusion even if the file is directly
named in the command line.
Also, if the filename is "-" (stdin) check the provided display name for
exclusion.
Also, avoid calling path checking functions on the "-" filename:
* fnmatch.fnmatch()
* os.path.isdir()
* os.path.exists()
|
| |
|
|
|
|
|
|
|
|
|
| |
On Flake8 2.x we added the information about the implementation,
version, and operating system to the --version output to make helping
users easier. In short they can pretty simply just give us the output
from
flake8 --version
And we can get a lot of the information that we need.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, pycodestyle never introspected the argument names for
classes except to require that ``tree`` be an argument it could pass.
For Flake8 3.0, we lifted that restriction, but old plugins seem to
have cargo-culted their __init__ signature to be
def __init__(self, tree, builtins=None):
For some yet unknown reason. This was causing an AttributeError. By
updating flake8.utils.parameters_for to return a dictionary that
indicates whether the parameter is required or not, we can side-step
this by simply ignoring the parameter if it has a default value and
we cannot provide it.
Closes #151
|
| |
|
|
|
|
| |
This fixes a regression in behaviour from 2.x to 3.
Closes #150
|
|
|
This is an emerging best practice and there is little reason to not
follow it
|