Using typing.Generic in Python

Posted on Fri, 18 Feb 2022 in Python • Tagged with python, type hints, typing, mypy, PyCharm

I am working on a project with a relatively large code-base. And it has a history. Our team wrote some parts of it way before type-hints. And we steel add hints to the legacy code or improve them. Is it worth the fuss? Sure! Our users are developers. They open our code in PyCharm every day. And they hope that it will help them to solve their task as quickly as possible.


Continue reading

Python Typing Hints List

Posted on Fri, 24 May 2019 in Python • Tagged with python, type hints

Here is my small list of sources of type hints in Python that I use almost every day.


Continue reading

Optional or Not in Abstract Classes

Posted on Mon, 27 Aug 2018 in Python • Tagged with python, type hints

Type hints are not mandatory in Python. So you can use them or not. If you decide work with them you’ll face many difficulties annotating functions or variables. This article shows my point of view on one specific case.


Continue reading