ruff/crates
Marcus Näslund b2d9f59937
[ruff] Implement a recursive check for RUF060 (#17976)
<!--
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

<!-- What's the purpose of the change? What does it do, and why? -->
The existing implementation of RUF060 (InEmptyCollection) is not
recursive, meaning that although set([]) results in an empty collection,
the existing code fails it because set is taking an argument.

The updated implementation allows set and frozenset to take empty
collection as positional argument (which results in empty
set/frozenset).

## Test Plan

Added test cases for recursive cases + updated snapshot (see RUF060.py).

---------

Co-authored-by: Marcus Näslund <marcus.naslund@kognity.com>
2025-05-12 16:17:13 -04:00
..
ruff disable jemalloc on android (#18033) 2025-05-12 14:41:00 +02:00
ruff_annotate_snippets ruff_annotate_snippets: address unused code warnings 2025-04-07 08:24:08 -04:00
ruff_benchmark Avoid initializing progress bars early (#18049) 2025-05-12 15:07:55 -04:00
ruff_cache Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_db ruff_db: completely rip lint: prefix out 2025-05-09 12:42:14 -04:00
ruff_dev [ty] Remove brackets around option names (#18037) 2025-05-12 11:16:03 +00:00
ruff_diagnostics Show errors for attempted fixes only when passed --verbose (#15237) 2025-01-03 08:50:13 -06:00
ruff_formatter Fix typos (#17988) 2025-05-09 14:57:14 -04:00
ruff_graph [ty] Update salsa (#17964) 2025-05-09 11:54:07 +02:00
ruff_index Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_linter [ruff] Implement a recursive check for RUF060 (#17976) 2025-05-12 16:17:13 -04:00
ruff_macros [ty] Document configuration schema (#17950) 2025-05-09 10:47:45 +02:00
ruff_notebook Split SourceLocation into LineColumn and SourceLocation (#17587) 2025-04-27 11:27:33 +01:00
ruff_options_metadata [ty] Document configuration schema (#17950) 2025-05-09 10:47:45 +02:00
ruff_python_ast Fix typos (#17988) 2025-05-09 14:57:14 -04:00
ruff_python_ast_integration_tests Visit Identifier node as part of the SourceOrderVisitor (#17110) 2025-04-01 16:58:09 +02:00
ruff_python_codegen Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_formatter Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_index Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_literal Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_parser Fix typos (#17988) 2025-05-09 14:57:14 -04:00
ruff_python_resolver Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_semantic [isort] Check full module path against project root(s) when categorizing first-party (#16565) 2025-05-05 11:40:01 -05:00
ruff_python_stdlib python_stdlib: update for 3.14 (#18014) 2025-05-11 11:25:54 -05:00
ruff_python_trivia Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_python_trivia_integration_tests Pass ParserOptions to the parser (#16220) 2025-02-19 10:50:50 -05:00
ruff_server Convert Message::SyntaxError to use Diagnostic internally (#17784) 2025-05-08 12:45:51 -04:00
ruff_source_file Convert Message::SyntaxError to use Diagnostic internally (#17784) 2025-05-08 12:45:51 -04:00
ruff_text_size Use #[expect(lint)] over #[allow(lint)] where possible (#17822) 2025-05-03 21:20:31 +02:00
ruff_wasm Bump 0.11.9 (#17986) 2025-05-09 10:43:27 -05:00
ruff_workspace [ty] Document configuration schema (#17950) 2025-05-09 10:47:45 +02:00
ty Avoid initializing progress bars early (#18049) 2025-05-12 15:07:55 -04:00
ty_ide ty: switch to use annotate-snippets ID functionality 2025-05-09 12:42:14 -04:00
ty_project Avoid initializing progress bars early (#18049) 2025-05-12 15:07:55 -04:00
ty_python_semantic [ty] Apply function specialization to all overloads (#18020) 2025-05-12 13:48:54 -04:00
ty_server Convert Message::SyntaxError to use Diagnostic internally (#17784) 2025-05-08 12:45:51 -04:00
ty_test [ty] Remove vestigial pyvenv.cfg creation in mdtest (#18006) 2025-05-10 20:52:49 +00:00
ty_vendored [ty] Add support for __all__ (#17856) 2025-05-07 21:42:42 +05:30
ty_wasm Avoid initializing progress bars early (#18049) 2025-05-12 15:07:55 -04:00