---
source: crates/ruff_linter/src/rules/flake8_future_annotations/mod.rs
---
FA100 [*] Add `from __future__ import annotations` to simplify `typing.List`
 --> from_typing_import_many.py:5:13
  |
4 | def main() -> None:
5 |     a_list: List[Optional[str]] = []
  |             ^^^^
6 |     a_list.append("hello")
7 |     a_dict = cast(Dict[int | None, Union[int, Set[bool]]], {})
  |
help: Add `from __future__ import annotations`
  |
1 + from __future__ import annotations
2 | from typing import Dict, List, Optional, Set, Union, cast
  |
note: This is an unsafe fix and may change runtime behavior

FA100 [*] Add `from __future__ import annotations` to simplify `typing.Optional`
 --> from_typing_import_many.py:5:18
  |
4 | def main() -> None:
5 |     a_list: List[Optional[str]] = []
  |                  ^^^^^^^^
6 |     a_list.append("hello")
7 |     a_dict = cast(Dict[int | None, Union[int, Set[bool]]], {})
  |
help: Add `from __future__ import annotations`
  |
1 + from __future__ import annotations
2 | from typing import Dict, List, Optional, Set, Union, cast
  |
note: This is an unsafe fix and may change runtime behavior
