ruff/crates
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
..
red_knot Upgrade salsa (#15039) 2024-12-17 15:50:33 +00:00
red_knot_python_semantic [red-knot] knot_extensions Python API (#15103) 2025-01-08 12:52:07 +01:00
red_knot_server Improve logging system using logLevel, avoid trace value (#15232) 2025-01-08 18:18:00 +05:30
red_knot_test Attribute panics to the mdtests that cause them (#15241) 2025-01-03 13:45:56 -05:00
red_knot_vendored [red-knot] knot_extensions Python API (#15103) 2025-01-08 12:52:07 +01:00
red_knot_wasm Rename custom-typeshed-dir, target-version and current-directory CLI options (#14930) 2024-12-13 08:21:52 +00:00
red_knot_workspace Don't special-case class instances in binary expression inference (#15161) 2025-01-06 13:50:20 -05:00
ruff Better error message when --config is given a table key and a non-inline-table value (#15266) 2025-01-06 13:20:28 +00:00
ruff_benchmark [red-knot] all types are assignable to object (#15332) 2025-01-07 15:19:07 -08:00
ruff_cache
ruff_db Attribute panics to the mdtests that cause them (#15241) 2025-01-03 13:45:56 -05:00
ruff_dev
ruff_diagnostics Show errors for attempted fixes only when passed --verbose (#15237) 2025-01-03 08:50:13 -06:00
ruff_formatter More typos found by codespell (#14880) 2024-12-09 22:47:34 +00:00
ruff_graph type: ignore[codes] and knot: ignore (#15078) 2024-12-23 10:52:43 +01:00
ruff_index
ruff_linter [pylint] Fix unreachable infinite loop (PLW0101) (#15278) 2025-01-08 09:45:04 -06:00
ruff_macros [red-knot] Add infrastructure to declare lints (#14873) 2024-12-10 16:14:44 +00:00
ruff_notebook
ruff_python_ast [RUF] Add rule to detect empty literal in deque call (RUF025) (#15104) 2025-01-03 11:57:13 +01:00
ruff_python_ast_integration_tests Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_python_codegen ruff_python_ast: Make Singleton Copy (#14943) 2024-12-12 20:49:54 +01:00
ruff_python_formatter Preserve multiline implicit concatenated strings in docstring positions (#15126) 2025-01-03 10:27:14 +01:00
ruff_python_index
ruff_python_literal Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_python_parser Modify parsing of raise with cause when exception is absent (#15049) 2024-12-19 13:36:32 +00:00
ruff_python_resolver Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_python_semantic [flake8-type-checking] Apply TC008 more eagerly in TYPE_CHECKING blocks and disapply it in stubs (#15180) 2025-01-08 12:09:06 +00:00
ruff_python_stdlib Revert "Add all PEP-585 names to UP006 rule" (#15250) 2025-01-04 12:23:53 +01:00
ruff_python_trivia type: ignore[codes] and knot: ignore (#15078) 2024-12-23 10:52:43 +01:00
ruff_python_trivia_integration_tests Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_server Improve logging system using logLevel, avoid trace value (#15232) 2025-01-08 18:18:00 +05:30
ruff_source_file [pyupgrade] Do not report when a UTF-8 comment is followed by a non-UTF-8 one (UP009) (#14728) 2024-12-11 10:30:41 +00:00
ruff_text_size
ruff_wasm Ruff 0.8.6 (#15253) 2025-01-04 13:09:26 +01:00
ruff_workspace [flake8-bugbear] Implement class-as-data-structure (B903) (#9601) 2025-01-06 21:18:28 -06:00