Closed difhel closed 2 weeks ago
the essence of typing type x: tp = tp()
is necessary for at least the fact that you can't have anything other than this type in the object x
When we remove this typing, we do not guarantee that this object is of the type we need. You can verify this by looking at the PyCharm hints. At the moment when he does not know what type of variables will be, he signs that any method is being used dynamically. It's bad.
It is only Pycharm issue, Pylint successfuly determines that these variables are constants, so all typings work correctly.
_Originally posted by @difhel in https://github.com/elansteam/backend/pull/21#discussion_r1474427149_