[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 248eb3efb3)

Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2025-12-17 12:50:22 +01:00 committed by GitHub
parent ce23b70ea6
commit eb1284eb26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 0 deletions

View file

@ -25,6 +25,7 @@ on:
- "Tools/build/update_file.py"
- "Tools/build/verify_ensurepip_wheels.py"
- "Tools/cases_generator/**"
- "Tools/check-c-api-docs/**"
- "Tools/clinic/**"
- "Tools/jit/**"
- "Tools/peg_generator/**"
@ -57,6 +58,7 @@ jobs:
"Lib/tomllib",
"Tools/build",
"Tools/cases_generator",
"Tools/check-c-api-docs",
"Tools/clinic",
"Tools/jit",
"Tools/peg_generator",

View file

@ -0,0 +1,19 @@
[mypy]
files = Tools/check-c-api-docs/
pretty = True
# We need `_colorize` import:
mypy_path = $MYPY_CONFIG_FILE_DIR/../../Misc/mypy
# Make sure Python can still be built
# using Python 3.13 for `PYTHON_FOR_REGEN`...
python_version = 3.13
# ...And be strict:
strict = True
extra_checks = True
enable_error_code =
ignore-without-code,
redundant-expr,
truthy-bool,
possibly-undefined,