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

Invalid nested PEP 585 syntax with postponed evaluation #953

Closed
cdce8p opened this issue Feb 16, 2021 · 2 comments
Closed

Invalid nested PEP 585 syntax with postponed evaluation #953

cdce8p opened this issue Feb 16, 2021 · 2 comments
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@cdce8p
Copy link

cdce8p commented Feb 16, 2021

Environment data

  • Language Server version: 2021.2.2
  • OS and version: darwin x64
  • Python version (and distribution if applicable, e.g. Anaconda): 3.8
  • python.analysis.indexing: undefined
  • python.analysis.typeCheckingMode: strict

Expected behaviour

PEP 585 syntax in type aliases is invalid in 3.7 / 3.8 even when nested inside Union / Tuple / Dict.

Actual behaviour

No errors

Logs

--

Code Snippet / Additional information

from __future__ import annotations
from typing import Union

Alias1 = Union[list[str], None]
Alias2 = Union[Union[list[int], int]]
Alias3 = Tuple[list[int]]
Alias4 = Dict[str, list[int]]
@erictraut
Copy link
Contributor

Thanks for the bug report. This will be fixed in the next release.

@erictraut erictraut added bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed triage labels Feb 16, 2021
@jakebailey
Copy link
Member

This issue has been fixed in version 2021.2.3, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202123-17-february-2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants