Enable Ruff N (pep8-naming) on non-stubs (#13327)

This commit is contained in:
Avasam
2025-01-02 05:22:40 -05:00
committed by GitHub
parent 67568b5e19
commit 73ce98b5a3
5 changed files with 17 additions and 13 deletions

View File

@@ -632,13 +632,13 @@ def latest_commit_is_different_to_last_commit_on_origin(branch: str) -> bool:
return True
class RemoteConflict(Exception):
class RemoteConflictError(Exception):
pass
def somewhat_safe_force_push(branch: str) -> None:
if has_non_stubsabot_commits(branch):
raise RemoteConflict(f"origin/{branch} has non-stubsabot changes that are not on {branch}!")
raise RemoteConflictError(f"origin/{branch} has non-stubsabot changes that are not on {branch}!")
subprocess.check_call(["git", "push", "origin", branch, "--force"])
@@ -808,7 +808,7 @@ async def main() -> None:
if isinstance(update, Obsolete): # pyright: ignore[reportUnnecessaryIsInstance]
await suggest_typeshed_obsolete(update, session, action_level=args.action_level)
continue
except RemoteConflict as e:
except RemoteConflictError as e:
print(colored(f"... but ran into {type(e).__qualname__}: {e}", "red"))
continue
raise AssertionError