ruff/crates/ruff_linter
cake-monotone 1df51b1fbf
[`pyupgrade`] Implement `unnecessary-default-type-args` (`UP043`) (#12371)
## Summary

Add new rule and implement for `unnecessary default type arguments`
under the `UP` category (`UP043`).

```py
// < py313
Generator[int, None, None] 

// >= py313
Generator[int]
```

I think that as Python 3.13 develops, there might be more default type
arguments added besides `Generator` and `AsyncGenerator`. So, I made
this more flexible to accommodate future changes.

related issue: #12286

## Test Plan

snapshot included..!
2024-07-17 19:45:43 +00:00
..
resources [`pyupgrade`] Implement `unnecessary-default-type-args` (`UP043`) (#12371) 2024-07-17 19:45:43 +00:00
src [`pyupgrade`] Implement `unnecessary-default-type-args` (`UP043`) (#12371) 2024-07-17 19:45:43 +00:00
Cargo.toml Bump version to v0.5.2 (#12316) 2024-07-14 10:43:58 -04:00
__init__.py [`pylint`] (Re-)Implement `import-private-name` (`C2701`) (#9553) 2024-01-16 14:03:11 -05:00