mirror of
https://github.com/astral-sh/ruff
synced 2026-01-10 16:15:19 -05:00
[perflint] Implement try-except-in-loop (PERF203) (#5166)
## Summary Implements PERF203 from #4789, which throws if a `try/except` block is inside of a loop. Not sure if we want to extend the diagnostic to the `except` as well, but I thought that that may get a little messy. We may also want to just throw on the word `try` - open to suggestions though. ## Test Plan `cargo test`
This commit is contained in:
@@ -18,6 +18,7 @@ ignore = [
|
||||
"G", # flake8-logging
|
||||
"T", # flake8-print
|
||||
"FBT", # flake8-boolean-trap
|
||||
"PERF", # perflint
|
||||
]
|
||||
|
||||
[tool.ruff.isort]
|
||||
|
||||
Reference in New Issue
Block a user