Skip to content

Commit

Permalink
run black formmatter
Browse files Browse the repository at this point in the history
Signed-off-by: Zack Koppert <[email protected]>
  • Loading branch information
zkoppert committed Feb 2, 2024
1 parent c26012b commit c260ab2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions stale_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,19 @@ def get_active_date(repo):
activity_method = os.getenv("ACTIVITY_METHOD", "pushed").lower()
if activity_method == "default_branch_updated":
commit = repo.branch(repo.default_branch).commit
active_date = parse(commit.commit.as_dict()['committer']['date'])
active_date = parse(commit.commit.as_dict()["committer"]["date"])
elif activity_method == "pushed":
last_push_str = repo.pushed_at # type: ignored
if last_push_str is None:
return None
active_date = parse(last_push_str)
else:
raise ValueError(f"""
raise ValueError(
f"""
ACTIVITY_METHOD environment variable has unsupported value: '{activity_method}'.
Allowed values are: 'pushed' and 'default_branch_updated'
"""
)
)
return active_date


Expand Down

0 comments on commit c260ab2

Please sign in to comment.