mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 04:06:54 +00:00
fix extended_default_select from plugin loading
This commit is contained in:
parent
73155616d1
commit
b62edd334a
4 changed files with 14 additions and 7 deletions
|
|
@ -376,7 +376,8 @@ class OptionManager:
|
|||
_set_group(loaded.plugin.package)
|
||||
add_options(self)
|
||||
|
||||
self.extend_default_select(loaded.entry_name)
|
||||
if loaded.plugin.entry_point.group == "flake8.extension":
|
||||
self.extend_default_select([loaded.entry_name])
|
||||
|
||||
# isn't strictly necessary, but seems cleaner
|
||||
self._current_group = None
|
||||
|
|
|
|||
|
|
@ -102,6 +102,11 @@ def _flake8_plugins(
|
|||
if ep.name == "F":
|
||||
yield Plugin(pyflakes_meta["name"], pyflakes_meta["version"], ep)
|
||||
elif ep.name.startswith("pycodestyle"):
|
||||
# pycodestyle provides both `E` and `W` -- but our default select
|
||||
# handles those
|
||||
# ideally pycodestyle's plugin entrypoints would exactly represent
|
||||
# the codes they produce...
|
||||
ep = importlib_metadata.EntryPoint("E", ep.value, ep.group)
|
||||
yield Plugin(
|
||||
pycodestyle_meta["name"], pycodestyle_meta["version"], ep
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue