diff options
author | Alexey Pelykh <alexey.pelykh@gmail.com> | 2023-02-09 20:16:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-09 20:16:02 +0100 |
commit | 71b6325c8499c8a66e90d90e88c75d7c7ab13b23 (patch) | |
tree | 5469f59cc6762feef6721f57f71d84f56ed81bb2 /pylint/testutils | |
parent | 70e2178dcaecdc4e90ac1cb45e06be261bd1e03b (diff) | |
download | pylint-git-71b6325c8499c8a66e90d90e88c75d7c7ab13b23.tar.gz |
Support Implicit Namespace Packages (PEP 420) (#8153)
Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com>
Diffstat (limited to 'pylint/testutils')
-rw-r--r-- | pylint/testutils/pyreverse.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pylint/testutils/pyreverse.py b/pylint/testutils/pyreverse.py index fc20b5453..7a61ff5fe 100644 --- a/pylint/testutils/pyreverse.py +++ b/pylint/testutils/pyreverse.py @@ -67,6 +67,7 @@ class PyreverseConfig( class TestFileOptions(TypedDict): + source_roots: list[str] output_formats: list[str] command_line_args: list[str] @@ -97,7 +98,11 @@ def get_functional_test_files( test_files.append( FunctionalPyreverseTestfile( source=path, - options={"output_formats": ["mmd"], "command_line_args": []}, + options={ + "source_roots": [], + "output_formats": ["mmd"], + "command_line_args": [], + }, ) ) return test_files @@ -106,7 +111,9 @@ def get_functional_test_files( def _read_config(config_file: Path) -> TestFileOptions: config = configparser.ConfigParser() config.read(str(config_file)) + source_roots = config.get("testoptions", "source_roots", fallback=None) return { + "source_roots": source_roots.split(",") if source_roots else [], "output_formats": config.get( "testoptions", "output_formats", fallback="mmd" ).split(","), |