-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
We can probably adjust our type hinting to avoid needing this cast:
with client.start_session() as session: # The type hint from pymongo doesn't have the enum values inherit from ReadPreference, so we must cast it here. return await session.with_transaction( execute_transaction, read_preference=cast(ReadPreference, ReadPreference.PRIMARY) )