Skip to content

Commit 6990fbb

Browse files
[3.13] gh-142859: Add Tools/check-c-api-docs to mypy check (GH-142860) (#142870)
gh-142859: Add `Tools/check-c-api-docs` to mypy check (GH-142860) (cherry picked from commit 248eb3e) Co-authored-by: sobolevn <[email protected]>
1 parent 9028594 commit 6990fbb

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.github/workflows/mypy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
- "Tools/build/update_file.py"
2424
- "Tools/build/umarshal.py"
2525
- "Tools/cases_generator/**"
26+
- "Tools/check-c-api-docs/**"
2627
- "Tools/clinic/**"
2728
- "Tools/jit/**"
2829
- "Tools/peg_generator/**"
@@ -55,6 +56,7 @@ jobs:
5556
"Lib/tomllib",
5657
"Tools/build",
5758
"Tools/cases_generator",
59+
"Tools/check-c-api-docs",
5860
"Tools/clinic",
5961
"Tools/jit",
6062
"Tools/peg_generator",

Tools/check-c-api-docs/mypy.ini

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[mypy]
2+
files = Tools/check-c-api-docs/
3+
pretty = True
4+
5+
# We need `_colorize` import:
6+
mypy_path = $MYPY_CONFIG_FILE_DIR/../../Misc/mypy
7+
8+
# Make sure Python can still be built
9+
# using Python 3.13 for `PYTHON_FOR_REGEN`...
10+
python_version = 3.13
11+
12+
# ...And be strict:
13+
strict = True
14+
extra_checks = True
15+
enable_error_code =
16+
ignore-without-code,
17+
redundant-expr,
18+
truthy-bool,
19+
possibly-undefined,

0 commit comments

Comments
 (0)