ruff/crates/ruff_linter/resources/test/fixtures/flake8_future_annotations
Charlie Marsh 83b8b62e3e
Avoid flagging __future__ annotations as required for non-evaluated type annotations (#11414)
## Summary

If an annotation won't be evaluated at runtime, we don't need to flag
`from __future__ import annotations` as required. This applies both to
quoted annotations and annotations outside of runtime-evaluated
positions, like:

```python
def main() -> None:
    a_list: list[str] | None = []
    a_list.append("hello")
```

Closes https://github.com/astral-sh/ruff/issues/11397.
2024-05-21 18:57:13 +00:00
..
edge_case.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
from_typing_import.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
from_typing_import_many.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
import_typing.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
import_typing_as.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
no_future_import_uses_lowercase.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
no_future_import_uses_union.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
no_future_import_uses_union_inner.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
ok_no_types.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
ok_non_simplifiable_types.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
ok_quoted_type.py Avoid flagging __future__ annotations as required for non-evaluated type annotations (#11414) 2024-05-21 18:57:13 +00:00
ok_uses_future.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
ok_variable_name.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00