mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[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 248eb3efb3)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
90285941d8
commit
6990fbb289
2 changed files with 21 additions and 0 deletions
2
.github/workflows/mypy.yml
vendored
2
.github/workflows/mypy.yml
vendored
|
|
@ -23,6 +23,7 @@ on:
|
|||
- "Tools/build/update_file.py"
|
||||
- "Tools/build/umarshal.py"
|
||||
- "Tools/cases_generator/**"
|
||||
- "Tools/check-c-api-docs/**"
|
||||
- "Tools/clinic/**"
|
||||
- "Tools/jit/**"
|
||||
- "Tools/peg_generator/**"
|
||||
|
|
@ -55,6 +56,7 @@ jobs:
|
|||
"Lib/tomllib",
|
||||
"Tools/build",
|
||||
"Tools/cases_generator",
|
||||
"Tools/check-c-api-docs",
|
||||
"Tools/clinic",
|
||||
"Tools/jit",
|
||||
"Tools/peg_generator",
|
||||
|
|
|
|||
19
Tools/check-c-api-docs/mypy.ini
Normal file
19
Tools/check-c-api-docs/mypy.ini
Normal 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,
|
||||
Loading…
Add table
Add a link
Reference in a new issue