Hi,
I’m trying to use pymongo on a pyright/pylance using codebase (strict), but after a bunch of trying, I’ve decided to just add # type: ignore to a bunch of lines.
I tried something similar. For me it was specifing the db you want to use.
So for your example you can use:
db = client[“database”] and then try db.collection.create_index()
Hi @Marcin_Platek, I think what you’re seeing is another unfortunate limitation from https://github.com/python/mypy/issues/3737. The ClientSession object is generic, but we can’t provide a default value so it defaults to unknown.