Skip to content

Commit

Permalink
server: add a type annotation to help completions in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
perrinjerome committed Jul 10, 2022
1 parent aad768c commit d538899
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pygls/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ class LanguageServer(Server):
`ThreadPoolExecutor`
"""

lsp: LanguageServerProtocol

def __init__(self, loop=None, protocol_cls=LanguageServerProtocol, max_workers: int = 2):
if not issubclass(protocol_cls, LanguageServerProtocol):
raise TypeError('Protocol class should be subclass of LanguageServerProtocol')
Expand Down

0 comments on commit d538899

Please sign in to comment.