You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pytype doesn't assume an attribute access returns the same object when called twice in succession. the workaround is to assign it to a local variable first, i.e. x = cls.mock_tzinfo; if x: ...
@martindemello - hmm, that seems quite an unfortunate choice, do you know if there are plans to change that?
(the fact you refer to it as a workaround gives me a little hope...)
I have this class method:
...where pytype complains but mypy does not, and it feels like the pytype complaint is erroneous:
Even if I change the guarding
if
block to beif cls._mock_tzinfo is not None
, the complaint remains.The text was updated successfully, but these errors were encountered: