PYTHON-6145ClosedFixed

Cursor and AsyncCursor annotate `let` as bool although runtime requires a document

PyMongo 4.18.1 and 4.18.2 / CPython 3.14.6 / mypy 2.3.1. No MongoDB server is needed. Both native cursor constructors declare `let: Optional[bool] = None`. Their implementations call `validate_is_document_type("let", let)` for any non-None value. A document constructs successfully; a boolean raises TypeError at construction. Mypy reports two arg-type errors for document arguments and accepts the boolean arguments. The affected released source is [Cursor](https://github.com/mongodb/mongo-py

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
4.20.0
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
greenerbuild