Skip to content

Fix mutable default arguments, shared RetryTimeout instance and wrong UPDATE error message - #302

Closed
claude-agentic-bot[bot] wants to merge 1 commit into
mainfrom
improvement/githost-retry-hygiene
Closed

claude-agentic-bot[bot] wants to merge 1 commit into
mainfrom
improvement/githost-retry-hygiene

Conversation

@claude-agentic-bot

Copy link
Copy Markdown

Summary

Small robustness cleanups found while reviewing the repo:

  • git_host/base.py: get/list/create/update used mutable defaults (params={}, headers={}). Replaced with None and normalised inside the methods, so a mutation by a client can't leak between calls.
  • git_host/base.py: update() raised 'CREATE is not supported…'; it now says UPDATE.
  • lib/retry.py: RetryHandler.wait(err=RetryTimeout()) created one exception instance at definition time, shared by every call (traceback accumulates on reuse). It now defaults to None and a fresh RetryTimeout is raised. Also removed an obsolete Python 2 comment.

No behaviour change for callers passing explicit arguments.

Testing

Only py_compile was run: pytest/flake8 are not installed in my environment, so please rely on CI for the test suite.

@claude-agentic-bot
claude-agentic-bot Bot requested a review from a team as a code owner October 5, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant