mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 05:28:13 +02:00
wrote better code
This commit is contained in:
@ -210,16 +210,17 @@ def process_repo(
|
||||
prs = repo.get_pulls(state="closed")
|
||||
|
||||
n_good_prs = 0
|
||||
with tqdm(prs, desc="Processing prs", leave=False) as pbar:
|
||||
for pr in pbar:
|
||||
with tqdm(total=prs.totalCount, desc="Processing prs", leave=False) as pbar:
|
||||
for pr in prs:
|
||||
pbar.set_postfix({"pr": pr.number, "# new good found": n_good_prs})
|
||||
if pr.merged_at is None:
|
||||
if pr.merged_at is None or not is_pull_good(pr):
|
||||
pbar.update(1)
|
||||
continue
|
||||
if is_pull_good(pr):
|
||||
n_good_prs += 1
|
||||
process_pull(repo, pr, dataset, repos_dir, cache)
|
||||
dataset.to_json(args.output)
|
||||
|
||||
n_good_prs += 1
|
||||
process_pull(repo, pr, dataset, repos_dir, cache)
|
||||
dataset.to_json(args.output)
|
||||
pbar.update(1)
|
||||
|
||||
|
||||
def process_repos(
|
||||
|
Reference in New Issue
Block a user