Skip to content

Commit 0b4cd7d

Browse files
committed
fix type errors
1 parent a41706f commit 0b4cd7d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/test_pool.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import logging
77
import tempfile
88
import time
9+
import typing as t
910
from pathlib import Path
1011

1112
import pytest
@@ -104,18 +105,20 @@ async def test_session_recycling_with_different_options(
104105
):
105106
"""Test recycling sessions with different options"""
106107

108+
options1: t.Mapping[str, t.Any]
109+
options2: t.Mapping[str, t.Any]
107110
if backend_name == "pyright":
108111
from lsp_types.pyright.config_schema import Model as ConfigType
109112

110-
options1: ConfigType = {"strict": ["reportUndefinedVariable"]}
111-
options2: ConfigType = {"strict": ["reportGeneralTypeIssues"]}
113+
options1 = ConfigType(strict=["reportUndefinedVariable"])
114+
options2 = ConfigType(strict=["reportGeneralTypeIssues"])
112115
code1 = "undefined_var = 1"
113116
code2 = "x: int = 'string'" # Type error
114117
else: # pyrefly
115118
from lsp_types.pyrefly.config_schema import Model as ConfigType
116119

117-
options1: ConfigType = {"verbose": True, "threads": 1}
118-
options2: ConfigType = {"verbose": False, "threads": 2}
120+
options1 = ConfigType(verbose=True, threads=1)
121+
options2 = ConfigType(verbose=False, threads=2)
119122
code1 = "test_var = 1"
120123
code2 = "x: int = 42"
121124

0 commit comments

Comments
 (0)