gh-142859: Add Tools/check-c-api-docs to mypy check (#142860)

This commit is contained in:
sobolevn 2025-12-17 14:23:30 +03:00 committed by GitHub
parent 1e9a0ee682
commit 248eb3efb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 0 deletions

View file

@ -26,6 +26,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/**"
@ -58,6 +59,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,