Skip to content

add test for new union syntax on generic bounds #11431

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

Merged
merged 2 commits into from
Nov 3, 2021

Conversation

DetachHead
Copy link
Contributor

@DetachHead DetachHead commented Nov 1, 2021

closes #10949

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you very much! :-)

@DetachHead
Copy link
Contributor Author

@hauntsaninja i'm not sure why the 3.10 tests are failing because it works when i run the same code locally. i assume 3.9 and below are failing because this new union syntax is only enabled in 3.10, so i moved the test to the newly created check-python310.test

@JelleZijlstra
Copy link
Member

This looks like a fixture issue to me. You may need a different one. See https://github.com/python/mypy/blob/master/test-data/unit/README.md#fixtures for an intro to fixtures.

@DetachHead
Copy link
Contributor Author

i can't seem to find a fixture that works, i thought maybe [builtins fixtures/type.pyi] since other tests that use the new union syntax use it but it doesn't seem to make a difference

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you! 👍

@hauntsaninja hauntsaninja merged commit 9cbd210 into python:master Nov 3, 2021
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
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.

new union syntax (types.Union) doesn't work on generic bounds
4 participants