Skip to content

Commit

Permalink
target python 3.10 as the mypy language version
Browse files Browse the repository at this point in the history
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:

python/typeshed#7564
python/mypy#12483
  • Loading branch information
eli-schwartz authored and nirbheek committed Nov 21, 2022
1 parent b9d19af commit 42e1cfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run_mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 42e1cfd

Please sign in to comment.