File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1818import tempfile
1919from configparser import ConfigParser
2020from pathlib import Path
21- from typing import IO , Any , Optional
21+ from typing import IO , Any , Optional , TypedDict
2222
2323try :
2424 import tomllib
6060# https://github.com/python-lsp/python-lsp-server/blob/v1.0.1/pylsp/plugins/pylint_lint.py#L55-L62
6161last_diagnostics : dict [str , list [dict [str , Any ]]] = collections .defaultdict (list )
6262
63+
6364# Windows started opening opening a cmd-like window for every subprocess call
6465# This flag prevents that.
6566# This flag is new in python 3.7
6667# This flag only exists on Windows
67- windows_flag : dict [str , int ] = (
68+ class WindowsFlag (TypedDict , total = False ):
69+ creationflags : int
70+
71+
72+ windows_flag : WindowsFlag = (
6873 {"creationflags" : subprocess .CREATE_NO_WINDOW } if os .name == "nt" else {} # type: ignore
6974)
7075
You can’t perform that action at this time.
0 commit comments