Skip to content

Commit 858534b

Browse files
committed
caching/check.py: Lower case HEADERS
After pylint 4.0.0: caching/check.py:46:0: C0103: Variable name "HEADERS" doesn't conform to snake_case naming style (invalid-name) caching/check.py:166:4: C0103: Variable name "HEADERS" doesn't conform to snake_case naming style (invalid-name) Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 4471535 commit 858534b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

caching/check.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
OWNER = "ClangBuiltLinux"
4444
REPO = "continuous-integration2"
4545
MAIN_BRANCH = "main"
46-
HEADERS = {} # populated after args are parsed
46+
headers = {} # populated after args are parsed
4747

4848
# states we allow our cache system to perform a cache-hit upon
4949
# other states like 'presuite' or 'unknown' or '' (empty) are considered
@@ -94,7 +94,7 @@ def ___purge___cache___():
9494
"""!!!completely clears the CBL CI cache!!!"""
9595
list_url = f"https://api.github.com/repos/{OWNER}/{REPO}/actions/variables"
9696

97-
list_response = requests.get(list_url, headers=HEADERS, timeout=TIMEOUT)
97+
list_response = requests.get(list_url, headers=headers, timeout=TIMEOUT)
9898
print(list_response.content)
9999
all_variables_keys = [
100100
x["name"] for x in json.loads(list_response.content)["variables"]
@@ -106,7 +106,7 @@ def ___purge___cache___():
106106
f"https://api.github.com/repos/{OWNER}/{REPO}/actions/variables/{key}"
107107
)
108108
delete_response = requests.delete(delete_url,
109-
headers=HEADERS,
109+
headers=headers,
110110
timeout=TIMEOUT)
111111
if delete_response.status_code != 204:
112112
print(f"ERROR: Couldn't delete cache entry with key {key}")
@@ -136,7 +136,7 @@ def get_clang_version():
136136
def get_repository_variable_or_none(name: str) -> Optional[dict]:
137137
_url = f"https://api.github.com/repos/{OWNER}/{REPO}/actions/variables/{name}"
138138

139-
response = requests.get(_url, headers=HEADERS, timeout=TIMEOUT)
139+
response = requests.get(_url, headers=headers, timeout=TIMEOUT)
140140
if response.status_code != 200:
141141
return None
142142

@@ -156,14 +156,14 @@ def create_repository_variable(name: str, linux_sha: str, clang_version: str,
156156
})
157157
data = {"name": name, "value": _value}
158158

159-
resp = requests.post(_url, headers=HEADERS, json=data, timeout=TIMEOUT)
159+
resp = requests.post(_url, headers=headers, json=data, timeout=TIMEOUT)
160160
print(f"create_repository_variable() response:\n{resp.content}")
161161

162162

163163
if __name__ == "__main__":
164164
args = parse_args()
165165

166-
HEADERS = {
166+
headers = {
167167
"Accept": "application/vnd.github+json",
168168
"Authorization": f"Bearer {args.github_token}",
169169
"X-GitHub-Api-Version": "2022-11-28",
@@ -228,7 +228,7 @@ def create_repository_variable(name: str, linux_sha: str, clang_version: str,
228228
""")
229229
update_repository_variable(
230230
VAR_NAME,
231-
http_headers=HEADERS,
231+
http_headers=headers,
232232
sha=curr_sha,
233233
clang_version=curr_clang_version,
234234
patches_hash=curr_patches_hash,

0 commit comments

Comments
 (0)