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
here the return type is defines as typing_Text and I'm not sure if that's correct. If I have the following type-decorator I get a typing error but the code works:
class DbInfiniteInt(TypeDecorator): # type: ignore
"""
A codec which maps a database integer value to "MaybeInfiniteInt"
"""
impl = Integer
def process_bind_param(
self,
value: Optional[MaybeInfiniteInt],
dialect: Dialect,
) -> Optional[int]: # <-- mypy complains about this return-type
if value is None:
return None
if value.is_infinite():
return -1
return int(value)
The text was updated successfully, but these errors were encountered:
I think you're right, that it's not. We've had to use # type: ignore on our process_bind_param functions. (I think this is a duplicate of #205 and #206.)
here the return type is defines as
typing_Text
and I'm not sure if that's correct. If I have the following type-decorator I get a typing error but the code works:The text was updated successfully, but these errors were encountered: