Skip to content

Commit dde5d75

Browse files
Apply ruff/Perflint rule PERF203
PERF203 `try`-`except` within a loop incurs performance overhead
1 parent 1f6d957 commit dde5d75

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

abi3audit/_cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,12 @@ def main() -> None:
228228
logging.root.setLevel("DEBUG")
229229

230230
specs = []
231-
for spec in args.specs:
232-
try:
231+
try:
232+
for spec in args.specs:
233233
specs.extend(make_specs(spec, assume_minimum_abi3=args.assume_minimum_abi3))
234-
except InvalidSpec as e:
235-
console.log(f"[red]:thumbs_down: processing error: {e}")
236-
sys.exit(1)
234+
except InvalidSpec as e:
235+
console.log(f"[red]:thumbs_down: processing error: {e}")
236+
sys.exit(1)
237237

238238
logger.debug(f"parsed arguments: {args}")
239239

0 commit comments

Comments
 (0)