https://github.com/python/cpython/commit/248eb3efb3cad7799ef9b4a2dd77a66d1ae65c11
commit: 248eb3efb3cad7799ef9b4a2dd77a66d1ae65c11
branch: main
author: sobolevn <[email protected]>
committer: hugovk <[email protected]>
date: 2025-12-17T13:23:30+02:00
summary:

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

files:
A Tools/check-c-api-docs/mypy.ini
M .github/workflows/mypy.yml

diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml
index fac0fa8aba3050..8810730e193bb6 100644
--- a/.github/workflows/mypy.yml
+++ b/.github/workflows/mypy.yml
@@ -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",
diff --git a/Tools/check-c-api-docs/mypy.ini b/Tools/check-c-api-docs/mypy.ini
new file mode 100644
index 00000000000000..f42eb2836e2fd8
--- /dev/null
+++ b/Tools/check-c-api-docs/mypy.ini
@@ -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,

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to