Skip to content

Commit c05a20a

Browse files
authored
[DPE-7513] Add pyright on tox lint check (#7)
* [DPE-7513] Add pyright on tox lint check * [DPE-7513] Add pyright on tox lint check * [DPE-7513] Add pyright on tox lint check * [DPE-7513] Add pyright on tox lint check * [DPE-7513] Add pyright on tox lint check
1 parent 1608d5a commit c05a20a

File tree

3 files changed

+54
-14
lines changed

3 files changed

+54
-14
lines changed

poetry.lock

Lines changed: 43 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ cassandra-driver = "^3.29.2"
1515
tenacity = "^9.1.2"
1616
charmlibs-pathops = "^1.0.1"
1717

18-
[tool.poetry.group.charm-libs.dependencies]
19-
2018
[tool.poetry.group.format]
2119
optional = true
2220

21+
[tool.poetry.group.charm-libs.dependencies]
22+
# data_platform_libs/v0/data_interfaces.py
23+
ops = ">=2.0.0"
24+
2325
[tool.poetry.group.format.dependencies]
2426
ruff = "^0.11.8"
2527

@@ -28,6 +30,7 @@ optional = true
2830

2931
[tool.poetry.group.lint.dependencies]
3032
codespell = "^2.4.1"
33+
pyright = "^1.1.402"
3134

3235
[tool.poetry.group.unit]
3336
optional = true
@@ -95,4 +98,5 @@ skip = "build,lib,venv,icon.svg,.tox,.git,.mypy_cache,.ruff_cache,.coverage"
9598

9699
[tool.pyright]
97100
include = ["src"]
98-
extraPaths = ["lib"]
101+
extraPaths = ["src","lib"]
102+
pythonVersion = "3.12"

tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,16 @@ commands =
3535
poetry run ruff check --fix {[vars]all_path}
3636

3737
[testenv:lint]
38+
deps =
39+
pyright
3840
description = Check code against coding style standards
3941
allowlist_externals =
4042
{[testenv]allowlist_externals}
4143
find
4244
commands_pre =
43-
poetry install --only lint,format
45+
poetry install --only lint,main,charm-libs,format
4446
commands =
47+
poetry run pyright
4548
poetry check --lock
4649
poetry run codespell {[vars]all_path}
4750
poetry run ruff check {[vars]all_path}

0 commit comments

Comments
 (0)