File tree Expand file tree Collapse file tree 5 files changed +17
-17
lines changed Expand file tree Collapse file tree 5 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def rawify_url(url):
20
20
# Proceed with making the call without authenticating -- stricter rate limits apply
21
21
pass
22
22
else :
23
- headers .update ({"Authorization" : f"Bearer { token } " })
23
+ headers .update ({"Authorization" : f"Bearer { token } " })
24
24
25
25
try :
26
26
response = requests .get (repos_api , headers = headers , timeout = 10 )
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def read_from_url(url):
15
15
# Proceed with making the call without authenticating -- stricter rate limits apply
16
16
pass
17
17
else :
18
- headers .update ({"Authorization" : f"Bearer { token } " })
18
+ headers .update ({"Authorization" : f"Bearer { token } " })
19
19
response = requests .get (url_raw , headers = headers , timeout = 30 )
20
20
if response .ok :
21
21
return response .text
Original file line number Diff line number Diff line change @@ -138,19 +138,19 @@ def __init__(self, author):
138
138
}
139
139
140
140
def _from_alias (self ):
141
- return f"AU - { self ._author .get ('alias' ) } \n "
141
+ return f"AU - { self ._author .get ('alias' )} \n "
142
142
143
143
def _from_given_and_last (self ):
144
- return f"AU - { self ._get_full_last_name () } , { self ._author .get ('given-names' ) } \n "
144
+ return f"AU - { self ._get_full_last_name ()} , { self ._author .get ('given-names' )} \n "
145
145
146
146
def _from_given (self ):
147
- return f"AU - { self ._author .get ('given-names' ) } \n "
147
+ return f"AU - { self ._author .get ('given-names' )} \n "
148
148
149
149
def _from_last (self ):
150
- return f"AU - { self ._get_full_last_name () } \n "
150
+ return f"AU - { self ._get_full_last_name ()} \n "
151
151
152
152
def _from_name (self ):
153
- return f"AU - { self ._author .get ('name' ) } \n "
153
+ return f"AU - { self ._author .get ('name' )} \n "
154
154
155
155
def as_string (self ):
156
156
key = self ._get_key ()
Original file line number Diff line number Diff line change @@ -44,24 +44,24 @@ def __init__(self, cffobj):
44
44
def _from_identifiers_url (self ):
45
45
urls = self ._get_urls_from_identifiers ()
46
46
if len (urls ) > 0 :
47
- return f"url = { '{' + urls [0 ].get ('value' ) + '}' } "
47
+ return f"url = {{ { urls [0 ].get ('value' )} } }"
48
48
return None
49
49
50
50
def _from_repository (self ):
51
- return f"url = { '{' + self ._cffobj .get ('repository' ) + '}' } "
51
+ return f"url = {{ { self ._cffobj .get ('repository' )} } }"
52
52
53
53
def _from_repository_artifact (self ):
54
- return f"url = { '{' + self ._cffobj .get ('repository-artifact' ) + '}' } "
54
+ return f"url = {{ { self ._cffobj .get ('repository-artifact' )} } }"
55
55
56
56
def _from_repository_code (self ):
57
- return f"url = { '{' + self ._cffobj .get ('repository-code' ) + '}' } "
57
+ return f"url = {{ { self ._cffobj .get ('repository-code' )} } }"
58
58
59
59
@staticmethod
60
60
def _from_thin_air ():
61
61
return None
62
62
63
63
def _from_url (self ):
64
- return f"url = { '{' + self ._cffobj .get ('url' ) + '}' } "
64
+ return f"url = {{ { self ._cffobj .get ('url' )} } }"
65
65
66
66
def as_string (self ):
67
67
key = "" .join ([
Original file line number Diff line number Diff line change @@ -44,24 +44,24 @@ def __init__(self, cffobj):
44
44
def _from_identifiers_url (self ):
45
45
urls = self ._get_urls_from_identifiers ()
46
46
if len (urls ) > 0 :
47
- return f"UR - { urls [0 ].get ('value' ) } \n "
47
+ return f"UR - { urls [0 ].get ('value' )} \n "
48
48
return None
49
49
50
50
def _from_repository (self ):
51
- return f"UR - { self ._cffobj .get ('repository' ) } \n "
51
+ return f"UR - { self ._cffobj .get ('repository' )} \n "
52
52
53
53
def _from_repository_artifact (self ):
54
- return f"UR - { self ._cffobj .get ('repository-artifact' ) } \n "
54
+ return f"UR - { self ._cffobj .get ('repository-artifact' )} \n "
55
55
56
56
def _from_repository_code (self ):
57
- return f"UR - { self ._cffobj .get ('repository-code' ) } \n "
57
+ return f"UR - { self ._cffobj .get ('repository-code' )} \n "
58
58
59
59
@staticmethod
60
60
def _from_thin_air ():
61
61
return None
62
62
63
63
def _from_url (self ):
64
- return f"UR - { self ._cffobj .get ('url' ) } \n "
64
+ return f"UR - { self ._cffobj .get ('url' )} \n "
65
65
66
66
def as_string (self ):
67
67
key = "" .join ([
You can’t perform that action at this time.
0 commit comments