Generic types, such as list
or dict
accept type arguments to specify the type of elements contained in the list or the
keys and values in the dictionary.
If a generic type is used without a type argument, the type arguments will implicitly assumed to be Any
. This makes the type hint less
informative and makes the contract of the function or variable annotated with the type hint more difficult to understand.
Furthermore, incomplete type hints can hinder IDE autocompletion and code insight capabilities of static analyis tools.