1
1
# Config file for running mypy on libregrtest.
2
- #
3
- # Note: mypy can't be run on libregrtest from the CPython repo root.
4
- # If you try to do so, mypy will complain
5
- # about the entire `Lib/` directory "shadowing the stdlib".
6
- # Instead, `cd` into `Lib/test`, then run `mypy --config-file libregrtest/mypy.ini`.
2
+ # Run mypy by invoking `mypy --config-file Lib/test/libregrtest/mypy.ini`
3
+ # on the command-line from the repo root
7
4
8
5
[mypy]
9
- packages = libregrtest
6
+ files = Lib/test/libregrtest
7
+ explicit_package_bases = True
10
8
python_version = 3.11
11
9
platform = linux
12
10
pretty = True
@@ -17,7 +15,6 @@ strict = True
17
15
18
16
# Various stricter settings that we can't yet enable
19
17
# Try to enable these in the following order:
20
- strict_optional = False
21
18
disallow_any_generics = False
22
19
disallow_incomplete_defs = False
23
20
disallow_untyped_calls = False
@@ -27,21 +24,10 @@ warn_return_any = False
27
24
28
25
disable_error_code = return
29
26
30
- # Various internal modules that typeshed deliberately doesn't have stubs for:
31
- [mypy-_abc.*]
32
- ignore_missing_imports = True
33
-
34
- [mypy-_opcode.*]
35
- ignore_missing_imports = True
36
-
37
- [mypy-_overlapped.*]
38
- ignore_missing_imports = True
39
-
40
- [mypy-_testcapi.*]
41
- ignore_missing_imports = True
42
-
43
- [mypy-_testinternalcapi.*]
44
- ignore_missing_imports = True
27
+ # Enable --strict-optional for these ASAP:
28
+ [mypy-Lib.test.libregrtest.main.*,Lib.test.libregrtest.run_workers.*,Lib.test.libregrtest.worker.*,Lib.test.libregrtest.single.*,Lib.test.libregrtest.results.*,Lib.test.libregrtest.utils.*]
29
+ strict_optional = False
45
30
46
- [mypy-test.*]
31
+ # Various internal modules that typeshed deliberately doesn't have stubs for:
32
+ [mypy-_abc.*,_opcode.*,_overlapped.*,_testcapi.*,_testinternalcapi.*,test.*]
47
33
ignore_missing_imports = True
0 commit comments