ruff/crates/ruff_python_semantic/src
Victor Hugo Gomes f2ae12bab3
[flake8-return] Fix false-positive for variables used inside nested functions in RET504 (#18433)
<!--
Thank you for contributing to Ruff/ty! 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? (Please prefix
with `[ty]` for ty pull
  requests.)
- Does this pull request include references to any relevant issues?
-->

## Summary

<!-- What's the purpose of the change? What does it do, and why? -->
This PR is the same as #17656.

I accidentally deleted the branch of that PR, so I'm creating a new one.

Fixes #14052

## Test Plan

Add regression tests
<!-- How was it tested? -->
2025-07-10 16:10:22 -04:00
..
analyze [flake8-pyi] Expand Optional[A] to A | None (PYI016) (#18572) 2025-06-27 15:43:11 +00:00
cfg Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
model [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
binding.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
branches.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
context.rs Remove separate ReferenceContext enum (#4631) 2023-05-24 15:12:38 +00:00
definition.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
globals.rs [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
imports.rs [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
lib.rs Control flow graph: setup (#17064) 2025-04-01 05:53:42 -05:00
model.rs [flake8-return] Fix false-positive for variables used inside nested functions in RET504 (#18433) 2025-07-10 16:10:22 -04:00
nodes.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
reference.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
scope.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
star_import.rs Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00