Add Type Check Test for Transactions

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Unknown
    • 4.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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)
          ) 

              Assignee:
              Steve Silvester
              Reporter:
              Steve Silvester
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: