Skip to content

Commit aa6343d

Browse files
committed
fix signature
1 parent b632bad commit aa6343d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pymongo/auth_shared.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def _validate_canonicalize_host_name(value: str | bool) -> str | bool:
100100
def _build_credentials_tuple(
101101
mech: str,
102102
source: Optional[str],
103-
user: str,
104-
passwd: str,
103+
user: Optional[str],
104+
passwd: Optional[str],
105105
extra: Mapping[str, Any],
106106
database: Optional[str],
107107
) -> MongoCredential:

test/auth_oidc/test_auth_oidc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,15 +859,15 @@ def test_2_6_ALLOWED_HOSTS_defaults_ignored(self):
859859
# Create a MongoCredential for OIDC with a machine callback.
860860
props = {"OIDC_CALLBACK": self.create_request_cb()}
861861
extra = dict(authmechanismproperties=props)
862-
mongo_creds = _build_credentials_tuple("MONGODB-OIDC", "", "foo", "", extra, "test")
862+
mongo_creds = _build_credentials_tuple("MONGODB-OIDC", None, "foo", None, extra, "test")
863863
# Assert that creating an authenticator for example.com does not result in an error.
864864
authenticator = _get_authenticator(mongo_creds, ("example.com", 30))
865865
assert authenticator.properties.username == "foo"
866866

867867
# Create a MongoCredential for OIDC with an ENVIRONMENT.
868868
props = {"ENVIRONMENT": "test"}
869869
extra = dict(authmechanismproperties=props)
870-
mongo_creds = _build_credentials_tuple("MONGODB-OIDC", "", "", "", extra, "test")
870+
mongo_creds = _build_credentials_tuple("MONGODB-OIDC", None, None, None, extra, "test")
871871
# Assert that creating an authenticator for example.com does not result in an error.
872872
authenticator = _get_authenticator(mongo_creds, ("example.com", 30))
873873
assert authenticator.properties.username is None

0 commit comments

Comments
 (0)