1# no from __future__ import annotations! 2from typing import List 3from typing import Literal 4 5 6def foo(x: Literal["r", "w"]) -> str | int: 7 raise NotImplementedError 8 9 10def bar(x: list["int"], /) -> List["int"]: 11 raise NotImplementedError
7def foo(x: Literal["r", "w"]) -> str | int: 8 raise NotImplementedError
11def bar(x: list["int"], /) -> List["int"]: 12 raise NotImplementedError