Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

False Positive in UP007 #7452

Closed
Matt-Ord opened this issue Sep 17, 2023 · 1 comment · Fixed by #7505
Closed

False Positive in UP007 #7452

Matt-Ord opened this issue Sep 17, 2023 · 1 comment · Fixed by #7505
Labels
accepted Ready for implementation bug Something isn't working

Comments

@Matt-Ord
Copy link

Matt-Ord commented Sep 17, 2023

False positive when using Union of unpacked TypeVarTuple. As far as I know there is no way to represent this without using Union[].

class Collection(Protocol[*_B0]):
    def __iter__(self) -> Iterator[Union[*_B0]]:
        ...

ruff 0.0.290

@charliermarsh charliermarsh added the bug Something isn't working label Sep 17, 2023
@charliermarsh
Copy link
Member

Thanks!

@charliermarsh charliermarsh added the accepted Ready for implementation label Sep 17, 2023
charliermarsh added a commit that referenced this issue Sep 19, 2023
## Summary

These can't be fixed, because fixing them would lead to invalid syntax.
So flagging them also feels misleading.

Closes #7452.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants