-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Release v1.1.0: LSP 3.17 support #377
Conversation
I tried running the unit tests at https://github.com/pappasam/jedi-language-server against main, and it didn't go well. Principal problem I'm seeing is:
presumably because Similar looks to be the case in I don't know if there are further problems behind these, I haven't tried fixing. |
By the way - apart from having more unit tests of course - this is the sort of thing that mypy is great for catching. if you annotated @overload
def _provider_options(self, feature: str) -> Union[Any, bool]:
...
@overload
def _provider_options(self, feature: str, default: T) -> Union[Any, T]:
... where $ mypy pygls/capabilities.py
pygls/capabilities.py:309: error: Incompatible types in assignment (expression has type "Any | bool", variable has type "DocumentOnTypeFormattingOptions | None") [assignment]
pygls/capabilities.py:400: error: Item "bool" of "Any | bool" has no attribute "resolve_provider" [union-attr]
pygls/capabilities.py:437: error: Item "bool" of "Any | bool" has no attribute "workspace_diagnostics" [union-attr]
pygls/capabilities.py:438: error: Incompatible types in assignment (expression has type "Any | bool", variable has type "DiagnosticOptions | DiagnosticRegistrationOptions | None") [assignment]
Found 4 errors in 1 file (checked 1 source file) I realise it's quite the undertaking to get this project mypy clean from its current state, but perhaps you will find it worthwhile to chip away at it. |
Thanks for catching it before the release went out! |
I'd argue that #383 should be merged prior to this PR, since it changes the interface to translating Positions. |
Shall we release then, or wait a few more days for any feedback? @dimbleby Totally agree about the types. I've actually started exposing all the typing errors (according to Pyright) in my editor by default: https://github.com/openlawlibrary/pygls/blob/main/pyproject.toml#L81 And I try to fix as much as possible as I'm working on other things. But I'm thinking of just doing some dedicated typing work as well. |
I don't expect to have any further comments on this, don't wait for me! re typing: an approach that I've seen used successfully in taking a project from lots-of-errors to clean is the ratchet:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we release then, or wait a few more days for any feedback?
I’m ready if you are :)
Fixes #346 (LSP 3.17 support)
Fixes #346 (LSP 3.17 support)
Is this all we need now for a release, to just bump the version number and all the automation takes care of the rest!? Only one way to find out 🤓
Code review checklist (for code reviewer to complete)