[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:
Evan Rittenhouse
2023-06-26 12:34:37 -05:00
committed by GitHub
parent d53b986fd4
commit 190bed124f
9 changed files with 144 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ ignore = [
"G", # flake8-logging
"T", # flake8-print
"FBT", # flake8-boolean-trap
"PERF", # perflint
]
[tool.ruff.isort]