Skip to content

Commit 5174e9c

Browse files
Apply patch and make lint happy
1 parent 37c6b38 commit 5174e9c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

completion.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_completion(
2626
clone_path = Path(clones_dir, repo)
2727
for branch in branches_from_devguide(Path(clones_dir, 'devguide')) + ['master']:
2828
try:
29-
git.Repo.clone_from(
29+
clone_repo = git.Repo.clone_from(
3030
f'https://github.com/{repo}.git', clone_path, branch=branch
3131
)
3232
except git.GitCommandError:
@@ -49,9 +49,10 @@ def get_completion(
4949

5050
if completion:
5151
# Fetch commit from before 30 days ago and checkout
52-
repo = git.Repo(clone_path)
53-
commit = next(repo.iter_commits('HEAD', max_count=1, before='30 days ago'))
54-
repo.git.checkout(commit.hexsha)
52+
commit = next(
53+
clone_repo.iter_commits('HEAD', max_count=1, before='30 days ago')
54+
)
55+
clone_repo.git.checkout(commit.hexsha)
5556
with TemporaryDirectory() as tmpdir:
5657
month_ago_completion = potodo.merge_and_scan_path(
5758
clone_path,

0 commit comments

Comments
 (0)