mongo-python-driver/test/mypy_fails/insert_one_list.py
2023-10-19 11:56:22 -05:00

9 lines
285 B
Python

from __future__ import annotations
from pymongo import MongoClient
client: MongoClient = MongoClient()
client.test.test.insert_one(
[{}]
) # error: Argument 1 to "insert_one" of "Collection" has incompatible type "List[Dict[<nothing>, <nothing>]]"; expected "Mapping[str, Any]"