When using pylance in strict mode a lot of static document methods have a typing issue
Type of "delete_all" is partially unknown
Type of "delete_all" is "(session: ClientSession | None = None, bulk_writer: BulkWriter | None = None, **pymongo_kwargs: Unknown) -> Coroutine[Any, Any, DeleteResult | None]"Pylance[reportUnknownMemberType](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportUnknownMemberType)
This is not only for delete_all but also for:
delete
insert
insert_many
...
And probably more
To Reproduce
In VSCode, set pylance type checking mode to strict
class Sample(Document):
name: str
age: int
is_active: bool
_id: Optional[PydanticObjectId] = None
Sample.delete_all() # pylance issue
Expected behavior
I would like to be able to use beanie document functions while using pylance strict type checking mode.
Is there a way to fix this apart from ignoring typing on the whole line with # type: ignore?
When using pylance in strict mode a lot of static document methods have a typing issue
This is not only for
delete_all
but also for:delete
insert
insert_many
And probably more
To Reproduce In VSCode, set pylance type checking mode to
strict
Expected behavior I would like to be able to use beanie document functions while using pylance strict type checking mode. Is there a way to fix this apart from ignoring typing on the whole line with
# type: ignore
?