Skip to content

Commit eb1284e

Browse files
[3.14] gh-142859: Add Tools/check-c-api-docs to mypy check (GH-142860) (#142871)
gh-142859: Add `Tools/check-c-api-docs` to mypy check (GH-142860) (cherry picked from commit 248eb3e) Co-authored-by: sobolevn <mail@sobolevn.me>
1 parent ce23b70 commit eb1284e

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
@@ -25,6 +25,7 @@ on:
2525
- "Tools/build/update_file.py"
2626
- "Tools/build/verify_ensurepip_wheels.py"
2727
- "Tools/cases_generator/**"
28+
- "Tools/check-c-api-docs/**"
2829
- "Tools/clinic/**"
2930
- "Tools/jit/**"
3031
- "Tools/peg_generator/**"
@@ -57,6 +58,7 @@ jobs:
5758
"Lib/tomllib",
5859
"Tools/build",
5960
"Tools/cases_generator",
61+
"Tools/check-c-api-docs",
6062
"Tools/clinic",
6163
"Tools/jit",
6264
"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)