Skip to content
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

[perflint] Improve docs for try-except-in-loop (PERF203) #12947

Merged
merged 1 commit into from
Aug 17, 2024
Merged

Conversation

AlexWaygood
Copy link
Member

Note that LBYL idioms are often a better remedy than moving the whole loop inside the try block, and qualify the language around "zero-cost" exceptions. Fixes #12805

@AlexWaygood
Copy link
Member Author

(cc. @Avasam)

Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@AlexWaygood AlexWaygood merged commit f9d8189 into main Aug 17, 2024
20 checks passed
@AlexWaygood AlexWaygood deleted the perf-docs branch August 17, 2024 15:00
@AlexWaygood AlexWaygood added the documentation Improvements or additions to documentation label Aug 17, 2024
@Avasam
Copy link

Avasam commented Aug 17, 2024

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

try-except-in-loop (PERF203) possibly false-positives with continue/pass in except block
3 participants