Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

pyupgrade rule for Unpack #13891

Closed
fzimmermann89 opened this issue Oct 23, 2024 · 0 comments · Fixed by #13988
Closed

pyupgrade rule for Unpack #13891

fzimmermann89 opened this issue Oct 23, 2024 · 0 comments · Fixed by #13988
Labels
accepted Ready for implementation help wanted Contributions especially welcome rule Implementing or modifying a lint rule

Comments

@fzimmermann89
Copy link

It seems ruff is missing asottile/pyupgrade#745 G[Unpack[T]] => G[*T] to change UNPACK to asterisk if supported by the python version:

from typing import Unpack
def f(*x: Unpack[tuple[int, ...]]):
    return x

should be rewritten as

def f(*x: *tuple[int, ...]):
    return x
@MichaReiser MichaReiser added the rule Implementing or modifying a lint rule label Oct 23, 2024
@AlexWaygood AlexWaygood added accepted Ready for implementation help wanted Contributions especially welcome labels Oct 23, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
accepted Ready for implementation help wanted Contributions especially welcome rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants