MCPcopy Create free account
hub / github.com/libgit2/pygit2 / Username

Class Username

pygit2/credentials.py:36–57  ·  view source on GitHub ↗

Username credentials This is an object suitable for passing to a remote's credentials callback and for returning from said callback.

Source from the content-addressed store, hash-verified

34
35
36class Username:
37 """Username credentials
38
39 This is an object suitable for passing to a remote's credentials
40 callback and for returning from said callback.
41 """
42
43 def __init__(self, username: str):
44 self._username = username
45
46 @property
47 def credential_type(self) -> CredentialType:
48 return CredentialType.USERNAME
49
50 @property
51 def credential_tuple(self) -> tuple[str]:
52 return (self._username,)
53
54 def __call__(
55 self, _url: str, _username: str | None, _allowed: CredentialType
56 ) -> Username:
57 return self
58
59
60class UserPass:

Callers 1

test_usernameFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_usernameFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…