Bulk Write InsertOne Should Be Parameter Of Collection Type

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Unknown
    • 4.3.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      coll: Collection[MovieWithoutId] = client.test.test
      coll.bulk_write([InsertOne(Movie({"_id": ObjectId(), "name": "THX-1138", "year": 1971}))])
      

      Bulk Write does not type check the inserted type based on the type of the collection. The previous example should raise an error in MyPy but does not.

              Assignee:
              Julius Park (Inactive)
              Reporter:
              Julius Park (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: