| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
https://gitlab.com/python-devs/importlib_metadata/issues/97
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
Replace setuptools with entrypoints
See merge request pycqa/flake8!264
|
| | | |
|
| |/ |
|
| |
|
|
| |
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
|
| |
|
|
|
| |
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 allows us to report whether or not a plugin is local when users
provide `flake8 --bug-report` output.
|
| | |
|
| | |
|
| |
|
|
| |
Closes #357
|
| | |
|
| |
|
|
|
|
|
|
| |
When we enable a plugin (when it's provided in the --enable-extensions)
plugin, we need to remove it both from the extended default ignore list
and the plain ignore list.
Closes #239
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
E.g.:
```
$ .tox/flake8/bin/flake8 mobileweb
Traceback (most recent call last):
File ".tox/flake8/bin/flake8", line 9, in <module>
load_entry_point('flake8', 'console_scripts', 'flake8')()
File "/Users/marca/dev/git-repos/flake8/src/flake8/main/cli.py", line 16, in main
app.run(argv)
File "/Users/marca/dev/git-repos/flake8/src/flake8/main/application.py", line 316, in run
self._run(argv)
File "/Users/marca/dev/git-repos/flake8/src/flake8/main/application.py", line 299, in _run
self.initialize(argv)
File "/Users/marca/dev/git-repos/flake8/src/flake8/main/application.py", line 289, in initialize
self.find_plugins()
File "/Users/marca/dev/git-repos/flake8/src/flake8/main/application.py", line 143, in find_plugins
self.check_plugins.load_plugins()
File "/Users/marca/dev/git-repos/flake8/src/flake8/plugins/manager.py", line 375, in load_plugins
plugins = list(self.manager.map(load_plugin))
File "/Users/marca/dev/git-repos/flake8/src/flake8/plugins/manager.py", line 267, in map
yield func(self.plugins[name], *args, **kwargs)
File "/Users/marca/dev/git-repos/flake8/src/flake8/plugins/manager.py", line 373, in load_plugin
return plugin.load_plugin()
File "/Users/marca/dev/git-repos/flake8/src/flake8/plugins/manager.py", line 173, in load_plugin
raise failed_to_load
flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "P999" due to Plugin <module 'teamcity.flake8_plugin' from '/Users/marca/dev/git-repos/teamcity-messages/teamcity/flake8_plugin.pyc'> is not a callable. It might be written for an older version of flake8 and might not work with this version.
```
This is nicer than the previous behavior of raising an obscure `PicklingError` and then hanging.
```
$ .tox/flake8/bin/flake8 mobileweb
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/queues.py", line 268, in _feed
send(obj)
PicklingError: Can't pickle <type 'module'>: attribute lookup __builtin__.module failed
```
See #164
|
| |
|
|
| |
It's redundant and the docs say explicitly that it's ignored.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Previously the --select was only ever populated to E,F,W,C and so
plugins would not be reported when not off-by-default. This adds a
tiny shim so that we enable plugins that are not off-by-default and
:x
:x
|
|
|
This is an emerging best practice and there is little reason to not
follow it
|