From 1a854232948f9e75c50bcb074db919e24dd8b510 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 29 Nov 2022 17:09:36 -0600 Subject: [PATCH 1/2] Update pre-commit hook versions --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2cf9a8b41..cf475e7b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 22.10.0 hooks: - id: black args: [ '--safe' ] @@ -18,7 +18,7 @@ repos: # E203 black conflicts with "whitespace before ':'" rule '--ignore=E501,W503,E203,C901' ] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.942 + rev: v0.991 hooks: - id: mypy exclude: /tests/ From ad8de4b9e792bf69223842e021e06102982db0fc Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 29 Nov 2022 17:12:01 -0600 Subject: [PATCH 2/2] Fix a mypy error caused by ambiguous import paths The `--explicit-package-bases` is one of two solutions. The other is to add `__init__.py` files to various directories, but longer term it might be better to change the repo directory structure. --- .pre-commit-config.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf475e7b5..33353102f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,12 @@ repos: - id: mypy exclude: /tests/ # --strict - args: [--no-strict-optional, --ignore-missing-imports, --implicit-reexport] + args: [ + --no-strict-optional, + --ignore-missing-imports, + --implicit-reexport, + --explicit-package-bases, + ] additional_dependencies: [ "types-attrs", "types-requests"