Skip to content

Commit e433d48

Browse files
authored
Merge pull request #385 from christian-monch/bf-type-error
Fix type annotation for `cfg`-parameter in `DataladAuth.__init__()`
2 parents c6ac9af + 00208f6 commit e433d48

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
### 🏠 Internal
2+
3+
- Use the correct type annotation for `cfg`-parameter of
4+
`datalad_next.utils.requests_auth.DataladAuth.__init__()`
5+
https://github.com/datalad/datalad-next/pull/385 (by @christian-monch)

datalad_next/utils/requests_auth.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import requests
1010
import www_authenticate
1111

12+
from datalad_next.config import ConfigManager
1213
from datalad_next.utils import CredentialManager
1314
from datalad_next.utils.http_helpers import get_auth_realm
1415

@@ -38,12 +39,12 @@ class DataladAuth(requests.auth.AuthBase):
3839
'bearer': 'token',
3940
}
4041

41-
def __init__(self, cfg: CredentialManager, credential: str | None = None):
42+
def __init__(self, cfg: ConfigManager, credential: str | None = None):
4243
"""
4344
Parameters
4445
----------
45-
cfg: CredentialManager
46-
Credentials are looked up in this instance.
46+
cfg: ConfigManager
47+
Is passed to CredentialManager() as `cfg`-parameter.
4748
credential: str, optional
4849
Name of a particular credential to be used for any operations.
4950
"""

0 commit comments

Comments
 (0)