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

Import __future__ annotations #2458

Merged
merged 4 commits into from
Apr 21, 2024

Conversation

deathaxe
Copy link
Contributor

This commit...

  1. adds from __future__ import annotations to each relevant module in order to enable language level type annotation support.
  2. as a result most quotation marks can be removed from type annotations.

@deathaxe deathaxe force-pushed the feat/future-annotations branch from c802e18 to ca0e088 Compare April 21, 2024 07:14
This commit...

1. adds `from __future__ import annotations` to each relevant module in order
   to enable language level type annotation support.
2. as a result most quotation marks can be removed from type annotations.
@deathaxe deathaxe force-pushed the feat/future-annotations branch from ca0e088 to 276953c Compare April 21, 2024 07:16
@predragnikolic
Copy link
Member

this PR triggers an error in LSP-elm ->

  File "/Users/predrag/Library/Application Support/Sublime Text/Packages/LSP-elm/types.py", line 29, in <module>
    'destination': NotRequired[MoveDestination]
  File "/Users/predrag/Library/Application Support/Sublime Text/Lib/python38/typing_extensions.py", line 2071, in __getitem__
    item = typing._type_check(parameters,
  File "./python3.8/typing.py", line 149, in _type_check
TypeError: NotRequired accepts only a single type. Got {}.
reloading plugin LSP-elm.types

@predragnikolic
Copy link
Member

predragnikolic commented Apr 21, 2024

I will fix this in LSP-elm,
but that error can be also happen in other LSP-*, although I have most checked out locally.

EDIT:
With #2456 the error no longer happens.

@predragnikolic predragnikolic merged commit 4c8da78 into sublimelsp:main Apr 21, 2024
8 checks passed
@predragnikolic
Copy link
Member

Thanks!

@deathaxe deathaxe deleted the feat/future-annotations branch April 21, 2024 12:17
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.

2 participants