| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
| |
Simplify the initialization code path by invoking
`config.ConfigFileFinder` directly instead of the extra hop by calling
the static class-level `Application.make_config_finder()` method.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Do not pass `noqa` to plugins, have flake8 decide whether to report
Closes #552
See merge request pycqa/flake8!331
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This reverts commit ba2fb9c53a8316642249598f599bbf7608d54260, reversing
changes made to 63b91c95ea7795e3c3c90f2d643f685bfff312e9.
|
| |
|
| |
This reverts merge request !253
|
| | |
|
| |
|
|
|
| |
Instead of just using Flake8 and pylint to keep Flake8 clean, let's also
use black to make it less manual for clean-up.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This attribute is introduced in pycodestyle 2.1.0
Closes #246
See: https://github.com/PyCQA/pycodestyle/issues/400
|
| |
|
|
|
|
|
| |
Apparently, some folks pass an empty string to --stdin-display-name. To
avoid the errors this causes, we need to handle it appropriately.
Closes #235
|
| |
|
|
|
|
|
|
| |
We opted to not copy the file_tokens attribute each time it's accessed
in the merge request discussion but it was never reflected in the code.
Further, the attribute had no documentation or docstring, so we've added
that. Finally, we address a personal style nit that I otherwise wouldn't
have picked at.
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The `tokens` property of the `FileProcessor` class only contains tokens of the
current line but not all tokens. So if a plugin which is only executed once
per file, that property is useless. To make the tokens also available to
plugins it is now be able to supply all the tokens of a file.
It also updates the documentation to separate which parameters are static and
which are changed on each line. Using the latter parameters on plugins which
are only run once per file isn't very sensible.
|
| | |
| |
| |
| | |
Closes #205
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Serialize Checkers PluginTypeManager to a dict
*Description of changes*
Try to side-step issues with attributes not being set/updated on plugins when used with multiprocessing and Queues.
*Related to:* #179, #164
See merge request !98
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It seems likely that the multiprocessing module on Windows is not
capable of serializing an object with the structure that we have and
preserving the attributes we dynamically set on plugins (like the
FlakesChecker). To avoid issues like this with all plugins (although
we have only found this on Windows with the FlakesChecker), let's try
serializing the Checkers PluginTypeManager to a dictionary so that the
only object that a Queue is really trying to serialize/deserialize is
the FlakesChecker itself.
Related to #179
|
| | | | |
|
| |/ /
| |
| |
| |
| | |
...since on py3 tokenize.TokenError does not have a 'message' attribute.
See #203.
|
| |/
|
|
|
|
|
|
|
|
|
| |
When attempting to centralize all inline NoQA handling in the StyleGuide
we inadvertently broke plugins relying on it in combination with checker
state. For example, the check for E402 relies both on NoQA and the state
to determine if it has seen a non-import line. Placing NoQA on the sole
line that is not an import is more elegant than placing it on each of
the following import lines.
Closes #186
|
| |
|
|
|
|
| |
The documentation for the `FileProcessor` class used `indect_char` while the
class itself uses the more sensible name `indent_char`. This updates both the
docstring as well as the documentation.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
This way plugins like flake8-putty can have access to the correct filename.
|
| |
|
|
|
|
|
|
| |
Some plugins (e.g., flake8-future-import) report errors for empty
files. Those plugins default to reporting the line number as 1 which
caused earlier versions of Flake8 3.0 beta to crash on an IndexError
Closes #157
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 is an emerging best practice and there is little reason to not
follow it
|