I'm using python 3.6, and wanted to use typing, because it's nice, you get better linting and you can catch errors before runtime, also autocomplete will be available.
I have this method :
def add_to_dynamic_dict(filenames_by_satustag: Dict[str, List[str]], status_tag: str, filename: str) -> Dict[str, List[str]]:
So before calling it I created a dictionary like this :
filenames_by_satustag = Dict[str, List[str]]
But when running the script I get
TypeError: typing.Dict[str, typing.List[str]] is not a generic class
on that line.
But it is correct according to the documentation :
https://docs.python.org/3.6/library/typing.html (26.1.1 type aliases, second bloc)
What did I do wrong?
Thanks.
filenames_by_satustag = Dict[str, List[str]]does not create a dictionary...