From adf17c059f0a61384dc8289441efa5f8506410d9 Mon Sep 17 00:00:00 2001 From: Jack Cherng Date: Tue, 18 Jun 2024 01:40:51 +0800 Subject: [PATCH] refactor: tidy codes Signed-off-by: Jack Cherng --- plugin/client.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/client.py b/plugin/client.py index 561f558..49b5ccc 100644 --- a/plugin/client.py +++ b/plugin/client.py @@ -21,6 +21,8 @@ from .template import render_template from .venv_finder import VenvInfo, find_venv_by_finder_names, get_finder_name_mapping +WindowId = int + @dataclass class WindowAttr: @@ -44,8 +46,8 @@ class LspBasedpyrightPlugin(NpmClientHandler): server_version = "" """The version of the language server.""" - window_attrs: defaultdict[int, WindowAttr] = defaultdict(WindowAttr) - """Per-window attributes. I.e., per-session attributes. The key is the window ID.""" + window_attrs: defaultdict[WindowId, WindowAttr] = defaultdict(WindowAttr) + """Per-window attributes. I.e., per-session attributes.""" @classmethod def required_node_version(cls) -> str: