From 23b0f8cab35dcb2f83f85e667bcf8438c6f01672 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/client.py b/plugin/client.py index 561f558..7f7086e 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,7 +46,7 @@ class LspBasedpyrightPlugin(NpmClientHandler): server_version = "" """The version of the language server.""" - window_attrs: defaultdict[int, WindowAttr] = defaultdict(WindowAttr) + window_attrs: defaultdict[WindowId, WindowAttr] = defaultdict(WindowAttr) """Per-window attributes. I.e., per-session attributes. The key is the window ID.""" @classmethod