faif / python-patterns

A collection of design patterns/idioms in Python
40.2k stars 6.93k forks source link

Support for type hints #373

Open yhay81 opened 3 years ago

yhay81 commented 3 years ago

Some files have type hints and others do not. I think writing type hints make it easier to understand the patterns. I suggest to write type hints and if its okay, I will work some.

And there are two typing style now in python, so I would ask which is good, >=3.9 style or <3.9 style. (mypy started to support for >=3.9 style just two days ago. https://mypy-lang.blogspot.com/2021/01/mypy-0800-released.html)

faif commented 3 years ago

Hi. Another contributor started adding type hints that's why some files have hints and some not. Feel free to continue with that but let's stick to <3.9 for now.