ruff/crates
cake-monotone 3728d5b3a2
[pyupgrade] Fix UP043 to apply to collections.abc.Generator and collections.abc.AsyncGenerator (#13611)
## Summary

fix #13602 

Currently, `UP043` only applies to typing.Generator, but it should also
support collections.abc.Generator.

This update ensures `UP043` correctly handles both
`collections.abc.Generator` and `collections.abc.AsyncGenerator`

### UP043
> `UP043`
> Python 3.13 introduced the ability for type parameters to specify
default values. As such, the default type arguments for some types in
the standard library (e.g., Generator, AsyncGenerator) are now optional.
> Omitting type parameters that match the default values can make the
code more concise and easier to read.

```py
Generator[int, None, None] -> Generator[int]
```
2024-10-03 13:06:15 +01:00
..
red_knot Use backticks for code in red-knot messages (#13599) 2024-10-02 03:14:28 +00:00
red_knot_python_semantic Use backticks for code in red-knot messages (#13599) 2024-10-02 03:14:28 +00:00
red_knot_server Use backticks for code in red-knot messages (#13599) 2024-10-02 03:14:28 +00:00
red_knot_vendored Rename the ruff_vendored crate to red_knot_vendored (#13586) 2024-10-01 16:16:59 +01:00
red_knot_wasm Use backticks for code in red-knot messages (#13599) 2024-10-02 03:14:28 +00:00
red_knot_workspace Use backticks for code in red-knot messages (#13599) 2024-10-02 03:14:28 +00:00
ruff Use backticks for code in red-knot messages (#13599) 2024-10-02 03:14:28 +00:00
ruff_benchmark Use backticks for code in red-knot messages (#13599) 2024-10-02 03:14:28 +00:00
ruff_cache Fix cache key collisions for paths with separators (#12159) 2024-07-03 07:36:46 -05:00
ruff_db Use backticks for code in red-knot messages (#13599) 2024-10-02 03:14:28 +00:00
ruff_dev Fix parentheses around return type annotations (#13381) 2024-09-20 09:23:53 +02:00
ruff_diagnostics [Minor typo] Fix article in "an fix" (#12797) 2024-08-10 21:22:00 -04:00
ruff_formatter Use backticks for code in red-knot messages (#13599) 2024-10-02 03:14:28 +00:00
ruff_graph Don't skip over imports and other nodes containing nested statements in import collector (#13521) 2024-09-26 11:57:05 +00:00
ruff_index [red-knot] small efficiency improvements and bugfixes to use-def map building (#12373) 2024-07-18 09:24:58 -07:00
ruff_linter [pyupgrade] Fix UP043 to apply to collections.abc.Generator and collections.abc.AsyncGenerator (#13611) 2024-10-03 13:06:15 +01:00
ruff_macros Drop deprecated nursery rule group (#10172) 2024-06-27 13:44:11 +02:00
ruff_notebook Fallback to kernelspec to check if it's a Python notebook (#12875) 2024-08-14 12:36:09 +05:30
ruff_python_ast [internal] ComparableExpr (f)strings and bytes made invariant under concatenation (#13301) 2024-09-25 16:58:57 +02:00
ruff_python_ast_integration_tests [internal] ComparableExpr (f)strings and bytes made invariant under concatenation (#13301) 2024-09-25 16:58:57 +02:00
ruff_python_codegen Implement iter(), len() and is_empty() for all display-literal AST nodes (#12807) 2024-08-12 10:39:28 +00:00
ruff_python_formatter refactor: Simplify quote selection logic (#13536) 2024-09-27 14:40:28 +02:00
ruff_python_index Enable token-based rules on source with syntax errors (#11950) 2024-07-02 08:57:46 +00:00
ruff_python_literal Remove some unused pub functions (#11576) 2024-05-28 09:56:51 -04:00
ruff_python_parser Expose internal types as public access (#13509) 2024-09-26 17:34:30 +02:00
ruff_python_resolver
ruff_python_semantic Detect tuples bound to variadic positional arguments i.e. *args (#13512) 2024-09-25 10:03:25 -05:00
ruff_python_stdlib Remove allocation from ruff_python_stdlib::builtins::python_builtins (#13317) 2024-09-10 16:34:24 -04:00
ruff_python_trivia Update dedent_to to support blocks that are composed of comments (#13572) 2024-10-01 04:38:03 +00:00
ruff_python_trivia_integration_tests Build CommentRanges outside the parser (#11792) 2024-06-09 09:55:17 +00:00
ruff_server Add support for extensionless Python files for server (#13326) 2024-09-12 00:35:26 +05:30
ruff_source_file Fix off-by one error in the LineIndex::offset calculation (#13407) 2024-09-19 11:58:45 +00:00
ruff_text_size Upgrade to Rust 1.79 (#11875) 2024-06-17 07:15:10 +01:00
ruff_wasm Bump version to 0.6.8 (#13522) 2024-09-26 14:09:03 +02:00
ruff_workspace Fix formatting for analyze direction values (#13476) 2024-09-23 09:18:28 +02:00