Summary
Running uvx ty example.py on
async def foo():
return 123
await foo()
Emits:
error[invalid-syntax]: `await` statement outside of a function
--> example.py:5:1
|
5 | await foo()
| ^^^^^^^^^^^
|
error[invalid-syntax]: `await` outside of an asynchronous function
--> example.py:5:1
|
5 | await foo()
| ^^^^^^^^^^^
|
Found 2 diagnostics
Version
ty 0.0.13 (fc1478b 2026-01-21)