Skip to content

Commit 1225f81

Browse files
author
1
committed
fix test
1 parent f30d9f7 commit 1225f81

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@ repos:
1818
rev: "v2.0.0" # Use the sha / tag you want to point at
1919
hooks:
2020
- id: mypy
21-
args: [ "--allow-untyped-globals", "--ignore-missing-imports" ]
21+
args: [
22+
"--allow-untyped-globals",
23+
"--ignore-missing-imports",
24+
# ``xontrib/`` is a PEP 420 namespace package (shared with every
25+
# other xontrib-* plugin), so we cannot add an ``__init__.py``.
26+
# Without these two flags mypy 2.x discovers ``xontrib/mplhooks.py``
27+
# twice — once as ``xontrib.mplhooks`` (from the project root) and
28+
# once as ``mplhooks`` (via sys.path) — and aborts.
29+
"--explicit-package-bases",
30+
"--namespace-packages",
31+
]
2232

2333
- repo: https://github.com/pre-commit/pre-commit-hooks
2434
rev: v6.0.0

0 commit comments

Comments
 (0)