Skip to content
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

if (version check) + elif (version check) is not rewritten! #848

Closed
asottile opened this issue Jul 1, 2023 · 0 comments · Fixed by #858
Closed

if (version check) + elif (version check) is not rewritten! #848

asottile opened this issue Jul 1, 2023 · 0 comments · Fixed by #858

Comments

@asottile
Copy link
Owner

asottile commented Jul 1, 2023

in --py38-plus mode I expect:

-    if sys.version_info < (3, 8):  # pragma: <3.8 cover
-        msg = "SyntaxError: can't assign to function call (<unknown>, line 1)"
-    elif sys.version_info < (3, 10):  # pragma: no cover
+    if sys.version_info < (3, 10):  # pragma: no cover
         msg = "SyntaxError: cannot assign to function call (<unknown>, line 1)"
     else:  # pragma: >=3.10 cover
         msg = (
             "SyntaxError: cannot assign to function call here. "
             "Maybe you meant '==' instead of '='? (<unknown>, line 1)"
         )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant