-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
(🎁) Report better errors with syntax errors from the future #12357
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
Comments
We would need the ability to parse future python in order to make this error message reliable, at which point there is really no benefit to this feature (as the only reason its a problem is that we can't parse future python). A shorter note that includes the version but isn't opinionated on the "perhaps" bit might be better, as I'd hate to give a misleading error message maybe 95% of the time (given that most of my syntax errors are not because I'm using future syntax, but because I forgot a colon or something). Another (breaking) option is to make using newer |
That is true, but as mentioned in the op, if this message is only shown when invoked with a future python-version, it would be much more reliable. |
Uh oh!
There was an error while loading. Please reload this page.
look at this playground
even though "Python 3.10" (
--python-version 3.10
) is specified it still fails with a syntax error. This is not exactly obvious from the error:Perhaps something a little more telling could be said?
If should probably only get mentioned if you specify a
--python-version
higher than the interpreter.The text was updated successfully, but these errors were encountered: