mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 05:26:53 +00:00
Rely on backports.entry_points_selectable for forward compatibility with importlib.metadata.
This commit is contained in:
parent
1d5dd156ab
commit
3d253e07f3
4 changed files with 23 additions and 25 deletions
|
|
@ -3,7 +3,6 @@ import mock
|
|||
import pytest
|
||||
|
||||
from flake8 import checker
|
||||
from flake8._compat import importlib_metadata
|
||||
from flake8.plugins import manager
|
||||
from flake8.processor import FileProcessor
|
||||
|
||||
|
|
@ -104,9 +103,9 @@ def mock_file_checker_with_plugin(plugin_target):
|
|||
|
||||
# Load the checker plugins using the entry point mock
|
||||
with mock.patch.object(
|
||||
importlib_metadata,
|
||||
manager,
|
||||
'entry_points',
|
||||
return_value={'flake8.extension': [entry_point]},
|
||||
return_value=[entry_point],
|
||||
):
|
||||
checks = manager.Checkers()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue