1
1
import abc
2
- from typing import Optional
2
+ from typing import Dict , Optional
3
3
4
4
5
5
class Credentials (abc .ABC ):
@@ -9,7 +9,7 @@ def __init__(self, site_id: Optional[str] = None, user_id_to_impersonate: Option
9
9
10
10
@property
11
11
@abc .abstractmethod
12
- def credentials (self ) -> dict [str , str ]:
12
+ def credentials (self ) -> Dict [str , str ]:
13
13
credentials = ("Credentials can be username/password, Personal Access Token, or JWT"
14
14
"This method returns values to set as an attribute on the credentials element of the request" )
15
15
return {"key" : "value" }
@@ -38,7 +38,7 @@ def __init__(self, username: str, password: str, site_id: Optional[str] = None,
38
38
self .username = username
39
39
40
40
@property
41
- def credentials (self ) -> dict [str , str ]:
41
+ def credentials (self ) -> Dict [str , str ]:
42
42
return {"name" : self .username , "password" : self .password }
43
43
44
44
def __repr__ (self ):
@@ -59,7 +59,7 @@ def __init__(self, token_name: str, personal_access_token: str, site_id: Optiona
59
59
self .personal_access_token = personal_access_token
60
60
61
61
@property
62
- def credentials (self ) -> dict [str , str ]:
62
+ def credentials (self ) -> Dict [str , str ]:
63
63
return {
64
64
"personalAccessTokenName" : self .token_name ,
65
65
"personalAccessTokenSecret" : self .personal_access_token ,
@@ -85,7 +85,7 @@ def __init__(self, jwt: str, site_id: Optional[str] = None, user_id_to_impersona
85
85
self .jwt = jwt
86
86
87
87
@property
88
- def credentials (self ) -> dict [str , str ]:
88
+ def credentials (self ) -> Dict [str , str ]:
89
89
return {"jwt" : self .jwt }
90
90
91
91
def __repr__ (self ):
0 commit comments