We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This appears to be similar to #1551 but is somewhat more of a problem as the error occurs even when mypy attempts to parse un-annotated code.
mypy
mypy doesn't mind this code at all:
def get_printer(thing): def printer(): print(thing) return printer
But if the inner function is defined as a coroutine using async/await syntax, like so:
async
await
def get_async_printer(thing): async def aprinter(): print(thing) return aprinter
mypy throws a bunch of errors:
$ mypy ./mypy-workout.py mypy-workout.py: note: In function "get_async_printer": mypy-workout.py:9: error: Parse error before "def" mypy-workout.py:9: error: Parse error before : mypy-workout.py:10: error: Inconsistent indentation mypy-workout.py: note: At top level: mypy-workout.py:15: error: Inconsistent indentation
This happens whether the file is annotated with type hints or not.
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
Oops! Don't know how I missed #1353... Well, thanks for responding so quickly. I'll follow that issue.
Dupe of #1453.
No branches or pull requests
This appears to be similar to #1551 but is somewhat more of a problem as the error occurs even when
mypy
attempts to parse un-annotated code.mypy
doesn't mind this code at all:But if the inner function is defined as a coroutine using
async
/await
syntax, like so:mypy
throws a bunch of errors:This happens whether the file is annotated with type hints or not.
The text was updated successfully, but these errors were encountered: