Do not use Any type as suggested in the ANN401.
Instead of
from typing import Any
def get_first(container: list[Any]) -> Any:
return container[0]
use the following
from typing import TypeVar
T = TypeVar('T')
def get_first(container: list[T]) -> T:
return container[0]
Any can probably still make sense for the *args / **kwargs.
Do not use
Anytype as suggested in the ANN401.Instead of
use the following
Anycan probably still make sense for the*args/**kwargs.