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
pull/10994/head
Eli Schwartz 2 years ago
parent a6db624aad
commit 0b7d935a84
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      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

Loading…
Cancel
Save