elansteam / backend

The API for ELAN testing system
9 stars 0 forks source link

Remove typings #26

Closed difhel closed 2 weeks ago

difhel commented 7 months ago
          Remove typings

_Originally posted by @difhel in https://github.com/elansteam/backend/pull/21#discussion_r1474427149_

Spotika commented 7 months 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.

difhel commented 7 months ago

It is only Pycharm issue, Pylint successfuly determines that these variables are constants, so all typings work correctly.