diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 49be9ad..5e17541 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,22 +1,22 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v5.0.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - id: requirements-txt-fixer - - repo: https://github.com/timothycrosley/isort - rev: 5.5.2 + - repo: https://github.com/PyCQA/isort + rev: 5.13.2 hooks: - id: isort args: ["--profile", "black"] - repo: https://github.com/psf/black - rev: 20.8b1 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v0.720' + rev: 'v1.11.2' hooks: - id: mypy args: [--ignore-missing-imports, --disallow-untyped-defs] diff --git a/dgtest/cli/cli.py b/dgtest/cli/cli.py index 577e5e4..9ee6742 100644 --- a/dgtest/cli/cli.py +++ b/dgtest/cli/cli.py @@ -153,7 +153,7 @@ def list_command( filter_: Optional[str], branch: Optional[str], ) -> None: - """ See 'list_dgtest_results' for more detail """ + """See 'list_dgtest_results' for more detail""" list_dgtest_results(source, tests, depth, list(ignore_paths), filter_, branch) @@ -177,7 +177,7 @@ def run_command( branch: Optional[str], pytest_opts: Tuple[str], ) -> None: - """ See 'run_dgtest_results' for more detail """ + """See 'run_dgtest_results' for more detail""" code = run_dgtest_results( source, tests, depth, list(ignore_paths), filter_, branch, list(pytest_opts) ) diff --git a/dgtest/core/parse.py b/dgtest/core/parse.py index 8fd03f1..00d5c9e 100644 --- a/dgtest/core/parse.py +++ b/dgtest/core/parse.py @@ -69,7 +69,7 @@ def parse_definition_nodes_from_codebase( def parse_definition_nodes_from_file(file: str) -> Dict[str, Set[str]]: - """ See `parse_definition_nodes_from_codebase` """ + """See `parse_definition_nodes_from_codebase`""" with open(file) as f: root = ast.parse(f.read(), file) @@ -116,7 +116,7 @@ def parse_import_nodes_from_file( source: str, definition_map: Dict[str, Set[str]], ) -> Set[str]: - """ See `parse_import_nodes_from_codebase` """ + """See `parse_import_nodes_from_codebase`""" imports = _gather_import_nodes_from_file(file) paths = set() for import_ in imports: @@ -204,7 +204,7 @@ def parse_pytest_fixtures_from_codebase( def parse_pytest_fixtures_from_file( file: str, definition_map: Dict[str, Set[str]] ) -> Dict[str, Set[str]]: - """ See `parse_pytest_fixtures_from_codebase` """ + """See `parse_pytest_fixtures_from_codebase`""" fixture_nodes = _gather_fixture_nodes_from_file(file) # Parse the body of each fixture and find symbols. @@ -296,7 +296,7 @@ def parse_pytest_tests_from_file( definition_map: Dict[str, Set[str]], fixture_map: Dict[str, Set[str]], ) -> Dict[str, Set[str]]: - """ See `parse_pytest_tests_from_codebase` """ + """See `parse_pytest_tests_from_codebase`""" # Parse the test file's imports and create associations between source files and test files file_graph: DefaultDict[str, Set[str]] = defaultdict(set) source_file_paths = parse_import_nodes_from_file(test_file, source, definition_map)