fix: add files to PR and switch reretry with tenacity#119
fix: add files to PR and switch reretry with tenacity#119fgvieira wants to merge 6 commits intosnakemake:mainfrom
Conversation
📝 WalkthroughWalkthroughUpdated Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@snakedeploy/prs.py`:
- Line 5: The current import and decorator use reretry-style parameters (tries,
delay) which tenacity doesn't support; update the import to bring in tenacity's
helpers (e.g., from tenacity import retry, stop_after_attempt, wait_fixed) and
replace the decorator usage "@retry(tries=..., delay=...)" with tenacity
equivalents, e.g. "@retry(stop=stop_after_attempt(<tries>),
wait=wait_fixed(<delay_seconds>))" so the retry behavior maps correctly; apply
this change where the `@retry` decorator is used (around line 59) and adjust
numeric values as needed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f8af5ad0-1b26-404f-b662-a90d515dc3ad
⛔ Files ignored due to path filters (1)
pyproject.tomlis excluded by!pyproject.toml
📒 Files selected for processing (1)
snakedeploy/prs.py
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@snakedeploy/prs.py`:
- Line 5: The import statement in prs.py has a syntax error: "from tenacity
import retry,, stop_after_attempt, wait_exponential" contains a double comma;
open the file and correct the import to list the symbols properly (ensure you
import retry, stop_after_attempt, and wait_exponential from tenacity without the
extra comma) so the module can be parsed and imported successfully.
- Around line 85-87: The except clause currently references
GithubException.UnknownObjectException (invalid attribute); update the handler
in snakedeploy/prs.py so it catches the correct exception: either import
UnknownObjectException and use "except UnknownObjectException as e" (add the
proper import at the top) or change the clause to catch the parent
"GithubException" like the earlier handler; make the rest of the logic (if
e.status != 404: raise e) remain unchanged.
Summary by CodeRabbit