Skip to content

Commit db7282b

Browse files
committed
Add pyright check
1 parent 160ae31 commit db7282b

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ lint: \
1515
ruff \
1616
pip-extra-reqs \
1717
pip-missing-reqs \
18+
pyright \
1819
pyroma \
1920
spelling \
2021
vulture \

lint.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ pylint:
4646
pyroma:
4747
pyroma --min 10 .
4848

49+
.PHONY: pyright
50+
pyright:
51+
pyright .
52+
4953
.PHONY: vulture
5054
vulture:
5155
vulture --min-confidence 100 --exclude _vendor --exclude .eggs .

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ dev = [
243243
"pip_check_reqs==2.4.4",
244244
"pydocstyle==6.3.0 ",
245245
"pyenchant==3.2.2 ",
246+
"pyright==1.1.300",
246247
"pylint==2.17.0 ",
247248
"pyroma==4.2",
248249
"pytest-cov==4.0.0",
@@ -271,3 +272,5 @@ where = ["src"]
271272
vws = ["py.typed"]
272273

273274
[tool.setuptools_scm]
275+
276+
[tool.pyright]

src/vws/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def query(
166166
}[result_code]
167167
raise exception(response=response)
168168

169-
result = []
169+
result: list[QueryResult] = []
170170
result_list = list(response.json()["results"])
171171
for item in result_list:
172172
target_data: TargetData | None = None

0 commit comments

Comments
 (0)