You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mypy reports that the port argument for the register_connection() function needs to be either a string or None:
Argument "port" to "register_connection" has incompatible type "int"; expected "str | None" [arg-type]
Which is what the mongoengine-stubs/connection.pyi file dictates. But when I replace it with a string representation of the port number, mongoengine reports the port must be an integer.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/mongoengine/connection.py", line 348, in _create_connection
return mongo_client_class(**connection_settings)
File "/usr/local/lib/python3.10/site-packages/pymongo/mongo_client.py", line 715, in __init__
raise TypeError("port must be an instance of int")
TypeError: port must be an instance of int
According to pymongo on github, the type check on the port has been there for 11 years, so I think this is just an oversight.
The text was updated successfully, but these errors were encountered:
mypy reports that the port argument for the register_connection() function needs to be either a string or None:
Which is what the
mongoengine-stubs/connection.pyi
file dictates. But when I replace it with a string representation of the port number, mongoengine reports the port must be an integer.According to pymongo on github, the type check on the port has been there for 11 years, so I think this is just an oversight.
The text was updated successfully, but these errors were encountered: