ruff/crates/ruff_linter
hikaru-kajita a28776e3aa
[flake8-comprehensions] Handled special case for C401 which also matches C416 (#10596)
## Summary

<!-- What's the purpose of the change? What does it do, and why? -->

Similar to #10419, there was a case where there is a collision of C401
and C416 (as discussed in #10101).
Fixed this by implementing short-circuit for the comprehension of the
form `{x for x in foo}`.

## Test Plan

<!-- How was it tested? -->

Extended `C401.py` with the case where `set` is not builtin function,
and divided the case where the short-circuit should occur.
Removed the last testcase of `print(f"{ {set(a for a in 'abc')} }")`
test as this is invalid as a python code, but should I keep this?
2024-03-26 03:54:58 +00:00
..
resources [flake8-comprehensions] Handled special case for C401 which also matches C416 (#10596) 2024-03-26 03:54:58 +00:00
src [flake8-comprehensions] Handled special case for C401 which also matches C416 (#10596) 2024-03-26 03:54:58 +00:00
__init__.py [pylint] (Re-)Implement import-private-name (C2701) (#9553) 2024-01-16 14:03:11 -05:00
Cargo.toml Bump version to v0.3.4 (#10515) 2024-03-21 18:08:21 +00:00