mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-09 14:24:17 +00:00
Merge branch 'graceful_ignore_per_file_ignores' into 'master'
Gracefully ignore flake8-per-file-ignores if installed See merge request pycqa/flake8!297
This commit is contained in:
commit
cfe9e92999
1 changed files with 6 additions and 0 deletions
|
|
@ -256,6 +256,12 @@ class PluginManager(object): # pylint: disable=too-few-public-methods
|
||||||
def _load_entrypoint_plugins(self):
|
def _load_entrypoint_plugins(self):
|
||||||
LOG.info('Loading entry-points for "%s".', self.namespace)
|
LOG.info('Loading entry-points for "%s".', self.namespace)
|
||||||
for entry_point in entrypoints.get_group_all(self.namespace):
|
for entry_point in entrypoints.get_group_all(self.namespace):
|
||||||
|
if entry_point.name == "per-file-ignores":
|
||||||
|
LOG.warning(
|
||||||
|
"flake8-per-file-ignores plugin is incompatible with "
|
||||||
|
"flake8>=3.7 (which implements per-file-ignores itself)."
|
||||||
|
)
|
||||||
|
continue
|
||||||
self._load_plugin_from_entrypoint(entry_point)
|
self._load_plugin_from_entrypoint(entry_point)
|
||||||
|
|
||||||
def _load_plugin_from_entrypoint(self, entry_point, local=False):
|
def _load_plugin_from_entrypoint(self, entry_point, local=False):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue