Skip to content
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

Fix type annotation for cfg-parameter in DataladAuth.__init__() #385

Merged
merged 4 commits into from
May 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### 🏠 Internal

- Use the correct type annotation for `cfg`-parameter of
`datalad_next.utils.requests_auth.DataladAuth.__init__()`
https://github.com/datalad/datalad-next/pull/385 (by @christian-monch)
7 changes: 4 additions & 3 deletions datalad_next/utils/requests_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import requests
import www_authenticate

from datalad_next.config import ConfigManager
from datalad_next.utils import CredentialManager
from datalad_next.utils.http_helpers import get_auth_realm

Expand Down Expand Up @@ -38,12 +39,12 @@ class DataladAuth(requests.auth.AuthBase):
'bearer': 'token',
}

def __init__(self, cfg: CredentialManager, credential: str | None = None):
def __init__(self, cfg: ConfigManager, credential: str | None = None):
"""
Parameters
----------
cfg: CredentialManager
Credentials are looked up in this instance.
cfg: ConfigManager
Is passed to CredentialManager() as `cfg`-parameter.
credential: str, optional
Name of a particular credential to be used for any operations.
"""
Expand Down