ruff/crates/ruff_linter/resources/test/fixtures/control-flow-graph
Auguste Lalande 450d4e0e0c
[pylint] Fix unreachable infinite loop (PLW0101) (#15278)
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

Fix infinite loop issue reported here #15248.
The issue was caused by the break inside the if block, which caused the
flow to exit in an unforeseen way. This caused other issues, eventually
leading to an infinite loop.

Resolves #15248. Resolves #15336.

## Test Plan

Added failing code to fixture.

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
Co-authored-by: dylwil3 <dylwil3@gmail.com>
2025-01-08 09:45:04 -06:00
..
assert.py [pylint] Re-implement unreachable (PLW0101) (#10891) 2025-01-02 21:54:59 -06:00
async-for.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
for.py [pylint] Re-implement unreachable (PLW0101) (#10891) 2025-01-02 21:54:59 -06:00
if.py [pylint] Re-implement unreachable (PLW0101) (#10891) 2025-01-02 21:54:59 -06:00
match.py Consider more wildcards in control flow graph matches (#8956) 2023-12-01 17:58:32 -05:00
raise.py Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
simple.py [pylint] Re-implement unreachable (PLW0101) (#10891) 2025-01-02 21:54:59 -06:00
try-finally-nested-if-while.py [internal] Return statements in finally block point to end block for unreachable (PLW0101) (#15276) 2025-01-07 11:26:04 -06:00
try.py [pylint] Fix unreachable infinite loop (PLW0101) (#15278) 2025-01-08 09:45:04 -06:00
while.py [pylint] Fix unreachable infinite loop (PLW0101) (#15278) 2025-01-08 09:45:04 -06:00