-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-5257 - Turn on mypy disallow_any_generics #2456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pymongo/network_layer.py
Outdated
else: | ||
result = asyncio.get_running_loop().create_future() | ||
# Future has been cancelled, close this connection | ||
# Future[Any] has been cancelled, close this connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this an accident?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, good catch! Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
hint: Optional[_IndexKeyHint] = None, | ||
**kwargs: Any, | ||
) -> list: | ||
) -> list[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessarily correct:
import pymongo as pm
cl = pm.MongoClient()
co = cl["test"]["test"]
co.insert_one({"x": 1})
type(next(iter(co.distinct("x")))) # int
No description provided.