The code seems to work, but I just noticed in this segment of code that quals is both the thing being iterated over AND something that is assigned to inside the loop. That seems like a bad idea even if it isn't broken. Need to change the name inside the loop to something else.
|
quals = [{"pushed": f"{d1}..{d2}"} for d1, d2 in zip(start_dates, end_dates)] |
|
|
|
print(f"Starting {len(quals)} queries", flush=True) |
|
|
|
if page_size > 100: |
|
raise ValueError("Github requires page_size <= 100") |
|
gh = Github(login_or_token=labyrinth.GH_TOKEN, per_page=page_size, retry=2) |
|
|
|
results = [] |
|
for qualifiers in quals: |
|
check_rate_limits(gh) |
|
quals = " ".join(f"{k}:{v}" for k, v in qualifiers.items()) |
|
qstr = f"{query} {quals}" |
The code seems to work, but I just noticed in this segment of code that
qualsis both the thing being iterated over AND something that is assigned to inside the loop. That seems like a bad idea even if it isn't broken. Need to change the name inside the loop to something else.labyrinth/labyrinth/search.py
Lines 53 to 65 in 53986fe