aboutsummaryrefslogtreecommitdiff
path: root/run_mypy.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-11-03 20:12:58 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-11-06 12:20:36 -0500
commit0b7d935a846b8f2aa33b4e0d19fd7b4423d35df4 (patch)
tree4671efd15ea40a41f82cbad4d752da867e99855c /run_mypy.py
parenta6db624aada29e0e11e7e0297d6310413dd1f8f9 (diff)
downloadmeson-0b7d935a846b8f2aa33b4e0d19fd7b4423d35df4.zip
meson-0b7d935a846b8f2aa33b4e0d19fd7b4423d35df4.tar.gz
meson-0b7d935a846b8f2aa33b4e0d19fd7b4423d35df4.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
Diffstat (limited to 'run_mypy.py')
-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