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

Handle single element cases in PYI016 #11273

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tusharsadhwani
Copy link
Contributor

Summary

For code like:

from typing import Union
x: Union[int, Union[int]]

PYI016 was not being raised, since the iterator was only matching on Tuples inside the Union[].

Same as PyCQA/flake8-pyi#484

Test Plan

cargo test

@tusharsadhwani tusharsadhwani marked this pull request as draft May 3, 2024 21:27
@tusharsadhwani
Copy link
Contributor Author

Seems to have broken PYI055 pretty severely. The PYI041 failure seems like a false positive though!

@zanieb zanieb self-requested a review May 4, 2024 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant