-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Description
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)
synic
Metadata
Metadata
Assignees
Labels
No labels