-
-
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
refactor: rename server Position to PositionCodec, instantiate it in Workspace #383
Conversation
5f8e598
to
8929a7d
Compare
Fixed lint checks |
There is a question as to whether we also want to roll back the recent changes that qualified lsprotocol symbols with If that's desirable I propose to do it in a separate PR. |
8929a7d
to
06ebe97
Compare
fixed Apologies for the forced updates. I am done now. |
Failing CI/test-pyodide but so is the main branch. The reported problem looks unrelated to pygls. |
This looks great! Thank you very much. I think in general throughout the codebase we're trying to move towards qualifying all I'm a big fan of force pushing in PRs, so thanks for that too. Yeah don't worry about the Pyodide test. You can select me or @alcarney, or both, to review this. |
06ebe97
to
96a6eaa
Compare
^^^ force push: make all deprecation warnings consistent: diff --git a/pygls/workspace/__init__.py b/pygls/workspace/__init__.py
index a18f9d5..4880ef4 100644
--- a/pygls/workspace/__init__.py
+++ b/pygls/workspace/__init__.py
@@ -17,9 +17,9 @@ Document = TextDocument
def utf16_unit_offset(chars: str):
warnings.warn(
- "'utf16_unit_offset' has been deprecated, use "
+ "'utf16_unit_offset' has been deprecated, instead use "
"'PositionCodec.utf16_unit_offset' via 'workspace.position_codec' "
- "or 'text_document.position_codec' instead",
+ "or 'text_document.position_codec'",
DeprecationWarning,
stacklevel=2,
) |
Thanks for the feedback! I don't believe that I have permissions to assign reviewers. I'm happy for both or either of you to review. |
96a6eaa
to
e65c193
Compare
^^^ rebased to latest main |
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.
Looks good to me :)
Thank you! ❤️ |
Description
Implement the refactoring discussed in #382
Position
type toPositionCodec
PositionCodec
instance inWorkspace
that is used by allTextDocument
instancesposition_encoding
andposition_codec
read-only properties toWorkspace
position_codec
a read-only property ofTextDocument
PositionCodec
Resolves #382
Code review checklist (for code reviewer to complete)