Created
June 10, 2026 12:15
-
-
Save AlexWaygood/bb8add3bc3fa057ebe6ff8b9f39fd6ef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"version": 1, "file_mapping": {"main.py": "main.py", "pyproject.toml": "pyproject.toml"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import asyncio | |
| from collections.abc import AsyncIterator | |
| async def is_even(value: int) -> bool: | |
| return value % 2 == 0 | |
| async def main() -> None: | |
| generator = (value for value in [1, 2, 3] if await is_even(value)) | |
| reveal_type(generator) | |
| print(await anext(generator, None)) | |
| asyncio.run(main()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [project] | |
| name = "sandbox" | |
| version = "0.1.0" | |
| requires-python = ">=3.10" | |
| dependencies = [] | |
| [tool.ty] | |
| [tool.ty.rules] | |
| undefined-reveal = "ignore" | |
| [tool.pyright] | |
| reportWildcardImportFromLibrary = false | |
| reportSelfClsParameterName = false | |
| reportUnusedExpression = false | |
| [tool.pyrefly] | |
| [tool.pyrefly.errors] | |
| unimported-directive = false | |
| [tool.mypy] | |
| color_output = true | |
| pretty = true | |
| check_untyped_defs = true | |
| [tool.zuban] | |
| pretty = true | |
| check_untyped_defs = true | |
| [tool.pycroscope] | |
| import_paths = ["."] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment