python lsp

This commit is contained in:
Christoph Brandau
2025-07-16 17:14:09 +02:00
parent 9febcebddb
commit 99718eb856
194 changed files with 52506 additions and 116 deletions
+17
View File
@@ -0,0 +1,17 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import Optional
import cattrs
from . import _hooks
def get_converter(
converter: Optional[cattrs.Converter] = None,
) -> cattrs.Converter:
"""Adds cattrs hooks for LSP lsp_types to the given converter."""
if converter is None:
converter = cattrs.Converter()
return _hooks.register_hooks(converter)