ruff/crates
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
..
ruff Rename `Diagnostic::syntax_error` methods, separate `Ord` implementation (#19179) 2025-07-08 09:54:19 -04:00
ruff_annotate_snippets Update Rust toolchain to 1.88 and MSRV to 1.86 (#19011) 2025-06-28 20:24:00 +02:00
ruff_benchmark [ty] Re-enable multithreaded pydantic benchmark (#19176) 2025-07-07 14:28:15 +02:00
ruff_cache Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_db Auto-generate environment variable references for ty (#19205) 2025-07-08 10:48:31 -04:00
ruff_dev Auto-generate environment variable references for ty (#19205) 2025-07-08 10:48:31 -04:00
ruff_diagnostics Combine `OldDiagnostic` and `Diagnostic` (#19053) 2025-07-03 13:01:09 -04:00
ruff_formatter Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_graph Update Rust toolchain to 1.88 and MSRV to 1.86 (#19011) 2025-06-28 20:24:00 +02:00
ruff_index Update Rust toolchain to 1.88 and MSRV to 1.86 (#19011) 2025-06-28 20:24:00 +02:00
ruff_linter [`flake8-return`] Fix false-positive for variables used inside nested functions in `RET504` (#18433) 2025-07-10 16:10:22 -04:00
ruff_macros [ty] Merge `ty_macros` into `ruff_macros` (#19229) 2025-07-09 11:28:21 +00:00
ruff_notebook Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_options_metadata [ty] Document configuration schema (#17950) 2025-05-09 10:47:45 +02:00
ruff_python_ast Make dependency `get-size2` truly optional in `ruff_python_ast` (#19052) 2025-06-30 21:50:59 -05:00
ruff_python_ast_integration_tests [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
ruff_python_codegen Fix f-string interpolation escaping (#18882) 2025-06-25 10:04:15 +02:00
ruff_python_formatter Update pre-commit dependencies (#19162) 2025-07-07 04:07:44 +00:00
ruff_python_index Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_python_literal Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_python_parser Combine `OldDiagnostic` and `Diagnostic` (#19053) 2025-07-03 13:01:09 -04:00
ruff_python_semantic [`flake8-return`] Fix false-positive for variables used inside nested functions in `RET504` (#18433) 2025-07-10 16:10:22 -04:00
ruff_python_stdlib Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_python_trivia Treat `ty: ` comments as pragma comments (#18532) 2025-06-07 16:02:43 +02:00
ruff_python_trivia_integration_tests Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ruff_server Rename `Diagnostic::syntax_error` methods, separate `Ord` implementation (#19179) 2025-07-08 09:54:19 -04:00
ruff_source_file [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
ruff_text_size [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
ruff_wasm Combine `OldDiagnostic` and `Diagnostic` (#19053) 2025-07-03 13:01:09 -04:00
ruff_workspace Fix description of the `format.skip-magic-trailing-comma` example (#19095) 2025-07-03 10:39:59 -04:00
ty [ty] Add a `--quiet` mode (#19233) 2025-07-10 09:40:47 -05:00
ty_ide [ty] Add type information to `all_members` API 2025-07-09 12:03:56 -04:00
ty_project [ty] Add a `--quiet` mode (#19233) 2025-07-10 09:40:47 -05:00
ty_python_semantic [ty] Make `check_file` a salsa query (#19255) 2025-07-10 18:46:56 +05:30
ty_server [ty] Add "kind" to completion suggestions 2025-07-09 12:03:56 -04:00
ty_static [ty] Merge `ty_macros` into `ruff_macros` (#19229) 2025-07-09 11:28:21 +00:00
ty_test [ty] Make `check_file` a salsa query (#19255) 2025-07-10 18:46:56 +05:30
ty_vendored [ty] Sync vendored typeshed stubs (#19174) 2025-07-07 12:00:09 +02:00
ty_wasm [ty] Add completion kind to playground (#19251) 2025-07-10 07:41:59 +00:00