Skip to content

Syntax error with Python 3.9 #10769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MasterSergius opened this issue Jul 6, 2021 · 4 comments
Closed

Syntax error with Python 3.9 #10769

MasterSergius opened this issue Jul 6, 2021 · 4 comments
Labels
bug mypy got something wrong

Comments

@MasterSergius
Copy link

MasterSergius commented Jul 6, 2021

Intro
I know, a lot of issues were created regarding my problem, for example #8872, and all of them are closed, but my problem still exists.

Bug Report
A lot of errors for type comments, like Tuple[str, str] - error: syntax error in type comment
Code was tested with python 3.6-3.8, but syntax errors appears only for Python 3.9, the last check was done with CPython-3.9.5 and mypy-0.910, full log can be found here https://github.com/MasterSergius/acachecontrol/pull/17/checks?check_run_id=2905621045

To Reproduce

  1. Write some code like:
def any_method(self, key: Tuple[str, str]) -> bool:
   pass
  1. Run mypy check within Python 3.9+, syntax error in result

Your Environment
CPython-3.9.5, mypy-0.910 (GH actions)
The same true for CPython-3.9.2, mypy-0.910, Ubuntu-20.04 (local system)

@MasterSergius MasterSergius added the bug mypy got something wrong label Jul 6, 2021
@hauntsaninja
Copy link
Collaborator

That's because all those issues were fixed, a long time ago. You're not using the mypy version you claim, you're using v0.720.

@MasterSergius
Copy link
Author

@hauntsaninja I bet, you haven't even opened that check log, provided via link above. I've also tested locally via pyenv. I can provide screenshots.

@emmatyping
Copy link
Member

@MasterSergius I'm actually quite sure that @hauntsaninja did click through to the log because that's they only way to know that your pre-commit config lists mypy 0.720 as mentioned, and that you haven't changed that. Please be more respectful to people who are volunteering their time to work on a tool you use.

@MasterSergius
Copy link
Author

@ethanhs hmm, you're right... Sorry, @hauntsaninja , I haven't spotted that, that's definitely my fault. The only question that I need to find the answer to - why I've got an error on my local machine, probably, some issues with pyenv. After full removal and recreating just for Python3.9.2 it started to work on my local machine too. Thank you again, I'll behave better, I promise )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

3 participants