Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

add test for new union syntax on generic bounds#11431

Merged
hauntsaninja merged 2 commits into
python:masterpython/mypy:masterfrom
DetachHead:masterDetachHead/mypy:masterCopy head branch name to clipboard
Nov 3, 2021
Merged

add test for new union syntax on generic bounds#11431
hauntsaninja merged 2 commits into
python:masterpython/mypy:masterfrom
DetachHead:masterDetachHead/mypy:masterCopy head branch name to clipboard

Conversation

@DetachHead

@DetachHead DetachHead commented Nov 1, 2021

Copy link
Copy Markdown
Contributor

closes #10949

@hauntsaninja hauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Comment thread mypy/test/testcheck.py Outdated
Comment thread test-data/unit/check-python310.test Outdated
Comment thread mypy/test/testcheck.py Outdated

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.