mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-12 23:54:17 +00:00
application: Remove local plugins state
The `.local_plugins` attribute can be removed from the `Application` since the usage of the `LocalPlugins` object is isolated to the `.find_plugins()` method.
This commit is contained in:
parent
e571167161
commit
131b063cb2
1 changed files with 4 additions and 6 deletions
|
|
@ -58,8 +58,6 @@ class Application(object):
|
||||||
)
|
)
|
||||||
options.register_default_options(self.option_manager)
|
options.register_default_options(self.option_manager)
|
||||||
|
|
||||||
#: The :class:`flake8.options.config.LocalPlugins` found in config
|
|
||||||
self.local_plugins = None # type: config.LocalPlugins
|
|
||||||
#: The instance of :class:`flake8.plugins.manager.Checkers`
|
#: The instance of :class:`flake8.plugins.manager.Checkers`
|
||||||
self.check_plugins = None # type: plugin_manager.Checkers
|
self.check_plugins = None # type: plugin_manager.Checkers
|
||||||
# fmt: off
|
# fmt: off
|
||||||
|
|
@ -167,18 +165,18 @@ class Application(object):
|
||||||
Determine whether to parse configuration files or not. (i.e., the
|
Determine whether to parse configuration files or not. (i.e., the
|
||||||
--isolated option).
|
--isolated option).
|
||||||
"""
|
"""
|
||||||
self.local_plugins = config.get_local_plugins(
|
local_plugins = config.get_local_plugins(
|
||||||
config_finder, config_file, ignore_config_files
|
config_finder, config_file, ignore_config_files
|
||||||
)
|
)
|
||||||
|
|
||||||
sys.path.extend(self.local_plugins.paths)
|
sys.path.extend(local_plugins.paths)
|
||||||
|
|
||||||
self.check_plugins = plugin_manager.Checkers(
|
self.check_plugins = plugin_manager.Checkers(
|
||||||
self.local_plugins.extension
|
local_plugins.extension
|
||||||
)
|
)
|
||||||
|
|
||||||
self.formatting_plugins = plugin_manager.ReportFormatters(
|
self.formatting_plugins = plugin_manager.ReportFormatters(
|
||||||
self.local_plugins.report
|
local_plugins.report
|
||||||
)
|
)
|
||||||
|
|
||||||
self.check_plugins.load_plugins()
|
self.check_plugins.load_plugins()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue