You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .pre-commit-config.yaml
+19-1
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,24 @@ repos:
22
22
hooks:
23
23
- id: mypy
24
24
files: '\.py$'
25
-
# exclude: "^tests/.+$"
25
+
args:
26
+
# These flags make mypy associate different module names to `test.py`
27
+
# files from different test directories.
28
+
- --explicit-package-bases
29
+
- --namespace-packages
26
30
additional_dependencies:
27
31
- pytest-lsp
32
+
- e3-testsuite
33
+
- psutil
34
+
- types-psutil
35
+
36
+
- repo: local
37
+
hooks:
38
+
# This hook checks that Python test directories are valid module names so
39
+
# that mypy will accept to analyse multiple test.py in different
40
+
# directories.
41
+
- id: py-filenames
42
+
name: Python test.py paths
43
+
entry: Python path components should be valid modules names (e.g. no '.' or whitespace). This is for mypy to accept dealing with test.py files in different directories.
0 commit comments