I have some reasons for this, but could be swayed to keep them:
- For folks who are learning, it tends to get in the way—there are way
too many questions about this.
- It doesn’t bring much value if there are reasonable tests.
- Not many folks are using `mypy` before run time.
Traceback (most recent call last):
File "blockchain.py", line 12, in <module>
class Blockchain:
File "blockchain.py", line 135, in Blockchain
def last_block(self) -> Dict[str: Any]:
File "/usr/local/lib/python3.6/typing.py", line 682, in inner
return func(*args, **kwds)
File "/usr/local/lib/python3.6/typing.py", line 1106, in __getitem__
params = tuple(_type_check(p, msg) for p in params)
File "/usr/local/lib/python3.6/typing.py", line 1106, in <genexpr>
params = tuple(_type_check(p, msg) for p in params)
File "/usr/local/lib/python3.6/typing.py", line 374, in _type_check
raise TypeError(msg + " Got %.100r." % (arg,))
TypeError: Parameters to generic types must be types. Got slice(<class 'str'>, typing.Any, None).