diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py index 494485ab467d..c7566855b771 100755 --- a/scripts/stubsabot.py +++ b/scripts/stubsabot.py @@ -715,7 +715,7 @@ def get_origin_owner() -> str: output = subprocess.check_output(["git", "remote", "get-url", "origin"], text=True).strip() match = re.match(r"(git@github.com:|https://github.com/)(?P[^/]+)/(?P[^/\s]+)", output) assert match is not None, f"Couldn't identify origin's owner: {output!r}" - assert match.group("repo").removesuffix(".git") == "typeshed", f'Unexpected repo: {match.group("repo")!r}' + assert match.group("repo").removesuffix(".git") == "typeshed", f"Unexpected repo: {match.group('repo')!r}" return match.group("owner") @@ -965,7 +965,7 @@ async def main() -> int: if args.distributions: dists_to_update = args.distributions else: - dists_to_update = [path.name for path in STUBS_PATH.iterdir()] + dists_to_update = sorted(path.name for path in STUBS_PATH.iterdir()) if args.action_level > ActionLevel.nothing: subprocess.run(["git", "update-index", "--refresh"], capture_output=True, check=False)