Skip to content

Commit 13fd573

Browse files
committed
fix: linting and spelling
Signed-off-by: Zack Koppert <zkoppert@github.com>
1 parent 54d35c8 commit 13fd573

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

stale_repos.py

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,8 @@ def get_days_since_last_release(repo):
188188
last_release = next(repo.releases())
189189
return (datetime.now(timezone.utc) - last_release.created_at).days
190190
except TypeError:
191-
print(
192-
f"{repo.html_url} had an exception trying to get the last release.\
193-
Potentially caused by ghost user."
194-
)
191+
print(f"{repo.html_url} had an exception trying to get the last release.\
192+
Potentially caused by ghost user.")
195193
return None
196194
except StopIteration:
197195
return None
@@ -233,17 +231,13 @@ def get_active_date(repo):
233231
return None
234232
active_date = parse(last_push_str)
235233
else:
236-
raise ValueError(
237-
f"""
234+
raise ValueError(f"""
238235
ACTIVITY_METHOD environment variable has unsupported value: '{activity_method}'.
239236
Allowed values are: 'pushed' and 'default_branch_updated'
240-
"""
241-
)
237+
""")
242238
except github3.exceptions.GitHubException:
243-
print(
244-
f"{repo.html_url} had an exception trying to get the activity date.\
245-
Potentially caused by ghost user."
246-
)
239+
print(f"{repo.html_url} had an exception trying to get the activity date.\
240+
Potentially caused by ghost user.")
247241
return None
248242
return active_date
249243

@@ -254,7 +248,7 @@ def output_to_json(inactive_repos, file=None):
254248
Args:
255249
inactive_repos: A list of dictionaries containing the repo,
256250
days inactive, the date of the last push,
257-
visiblity of the repository (public/private),
251+
visibility of the repository (public/private),
258252
days since the last release, and days since the last pr.
259253
260254
Returns:
@@ -339,10 +333,8 @@ def set_repo_data(
339333
try:
340334
repo_data["days_since_last_pr"] = get_days_since_last_pr(repo)
341335
except github3.exceptions.GitHubException:
342-
print(
343-
f"{repo.html_url} had an exception trying to get the last PR.\
344-
Potentially caused by ghost user."
345-
)
336+
print(f"{repo.html_url} had an exception trying to get the last PR.\
337+
Potentially caused by ghost user.")
346338

347339
print(f"{repo.html_url} {days_inactive} days inactive") # type: ignore
348340
return repo_data

0 commit comments

Comments
 (0)