Skip to content

Commit d2ad317

Browse files
committed
Type windows_flag to fix 'call-overload' mypy error
1 parent d99db91 commit d2ad317

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pylsp_mypy/plugin.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import tempfile
1919
from configparser import ConfigParser
2020
from pathlib import Path
21-
from typing import IO, Any, Optional
21+
from typing import IO, Any, Optional, TypedDict
2222

2323
try:
2424
import tomllib
@@ -64,7 +64,11 @@
6464
# This flag prevents that.
6565
# This flag is new in python 3.7
6666
# This flag only exists on Windows
67-
windows_flag: dict[str, int] = (
67+
class WindowsFlag(TypedDict, total=False):
68+
creationflags: int
69+
70+
71+
windows_flag: WindowsFlag = (
6872
{"creationflags": subprocess.CREATE_NO_WINDOW} if os.name == "nt" else {} # type: ignore
6973
)
7074

0 commit comments

Comments
 (0)