Failure(4).map(lambda number: number / 2)
# => Failure(2)
Looks like .map got executed for a Failure. Is it a bug?
Also, does PyCharm handle @safe decorator properly? I mean, if I have a function something() -> User, do I get auto-completions for User and not [User, WhateverExcetpion]?
Looks like
.map
got executed for aFailure
. Is it a bug?Also, does PyCharm handle
@safe
decorator properly? I mean, if I have a functionsomething() -> User
, do I get auto-completions forUser
and not[User, WhateverExcetpion]
?Sorry, that's a typo! And thanks for noticing. I have updated this line:
PyCharm resolves types correctly, since we are shipping PEP561 annotations.