mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-22 16:22:52 +00:00
![]() <!-- 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 I've also found another bug while fixing this, where the diagnostic would not trigger if the `len` call argument variable was shadowed. This fixed a few false negatives in the test cases. Example: ```python fruits = [] fruits = [] if len(fruits): # comment ... ``` Fixes #18811 Fixes #18812 <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan Add regression test <!-- How was it tested? --> --------- Co-authored-by: Charlie Marsh <crmarsh416@gmail.com> |
||
---|---|---|
.. | ||
resources | ||
src | ||
Cargo.toml |