-
Notifications
You must be signed in to change notification settings - Fork 14
fix: avoid try/except inside a loop #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e14a69f to
f5ef8c0
Compare
WalkthroughIntroduces a per-directory Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 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)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@tools/install.py`:
- Around line 168-177: The safe_action wrapper currently uses a bare except
which hides all errors; change it to catch only Exception (e.g., except
Exception as e) and, if the installer is not in silent mode (check the silent
variable or its equivalent), log the exception (including e and context like
paths/destination and function name safe_action) before continuing; ensure you
still call action(options, paths, destination) inside the try/except and
preserve the original behavior of continuing the loop in the os.walk block that
builds paths and calls safe_action.
Fixes this linting error: ``` PERF203 `try`-`except` within a loop incurs performance overhead ```
f5ef8c0 to
c4b26df
Compare
riosje
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes this linting error: ``` PERF203 `try`-`except` within a loop incurs performance overhead ``` PR-URL: #419 Reviewed-By: Jefferson <[email protected]>
|
Landed in c4442b3 |
Fixes this linting error:
Summary by CodeRabbit