aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-11-03 20:12:58 -0400
committerNirbheek Chauhan <nirbheek@centricular.com>2022-11-21 15:43:52 +0530
commit42e1cfdfe21c08b91a1cc548e50831aae614b6db (patch)
tree54c98fff86ace8d3703f0d673a120a6fd4b342f6
parentb9d19afb9af38b223d69bf2f97ec1b2555842066 (diff)
downloadmeson-42e1cfdfe21c08b91a1cc548e50831aae614b6db.zip
meson-42e1cfdfe21c08b91a1cc548e50831aae614b6db.tar.gz
meson-42e1cfdfe21c08b91a1cc548e50831aae614b6db.tar.bz2
target python 3.10 as the mypy language version
mypy has a bug when running on/for 3.11 which results in incorrect analysis of the codebase, specifically due to enum.Enum's self.name See: https://github.com/python/typeshed/issues/7564 https://github.com/python/mypy/issues/12483
-rwxr-xr-xrun_mypy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/run_mypy.py b/run_mypy.py
index ba8211e..3daf7c7 100755
--- a/run_mypy.py
+++ b/run_mypy.py
@@ -120,7 +120,7 @@ def main() -> int:
if not opts.quiet:
print('Running mypy (this can take some time) ...')
p = subprocess.run(
- [sys.executable, '-m', 'mypy'] + args + to_check,
+ [sys.executable, '-m', 'mypy', '--python-version', '3.10'] + args + to_check,
cwd=root,
)
return p.returncode