forked from openlawlibrary/pygls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
107 lines (90 loc) · 2.8 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
[tool.poetry]
name = "pygls"
version = "1.1.0"
description = "A pythonic generic language server (pronounced like 'pie glass')"
authors = ["Open Law Library <[email protected]>"]
maintainers = [
"Tom BH <[email protected]>",
"Alex Carney <[email protected]>",
]
repository = "https://github.com/openlawlibrary/pygls"
documentation = "https://pygls.readthedocs.io/en/latest"
license = "Apache 2.0"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.7.9,<4"
lsprotocol = "2023.0.0b1"
typeguard = "^3.0.0"
websockets = {version = "^11.0.3", optional = true}
[tool.poetry.extras]
ws = ["websockets"]
[tool.poetry.group.dev.dependencies]
# Replaces (amongst many other things) flake8 and bandit
ruff = "^0.0.275"
# TODO `poethepoet>=0.20` needs python 3.8
poethepoet = "^0.19.0"
mypy = "^1.4.1"
# TODO `black>=23` needs python 3.8
black = "22.8"
[tool.poetry.group.test.dependencies]
coverage = { version = "^7.2.1", extras = ["toml"] }
pytest = "7.1.2"
pytest-asyncio = "^0.21.0"
[tool.poetry.group.docs.dependencies]
# TODO `sphinx==7` needs python 3.8
sphinx = "^5"
# TODO `sphinx-rtd-theme==1.3.0` will support `sphinx==7`
sphinx-rtd-theme = "^1.2.2"
[tool.poetry.group.pyodide.dependencies]
selenium = "^4.10.0"
[tool.pytest.ini_options]
asyncio_mode = "auto"
[tool.poe.tasks]
test-pyodide = "python tests/pyodide_testrunner/run.py"
ruff = "ruff check ."
mypy = "mypy -p pygls"
check_generated_client = "python scripts/check_client_is_uptodate.py"
check_commit_style = "npx commitlint --from origin/main --to HEAD --verbose --config commitlintrc.yaml"
generate_client = "python scripts/generate_client.py --output pygls/lsp/client.py"
generate_contributors_md = "python scripts/generate_contributors_md.py"
black_check = "black --check ."
[tool.poe.tasks.test]
env = { COVERAGE_PROCESS_START = "pyproject.toml" }
sequence = [
{ cmd = "python -c 'import pathlib,sys; pathlib.Path(f\"{sys.path[-1]}/cov.pth\").write_text(\"import coverage; coverage.process_startup()\");'"},
{ cmd = "coverage erase" },
{ cmd = "coverage run -m pytest" },
{ cmd = "coverage combine" },
{ cmd = "coverage report" },
]
ignore_fail = "return_non_zero"
[tool.poe.tasks.lint]
sequence = [
"ruff",
"mypy",
"check_generated_client",
"check_commit_style",
"black_check"
]
ignore_fail = "return_non_zero"
[tool.pyright]
strict = ["pygls"]
[tool.ruff]
# Sometimes Black can't reduce line length without breaking more imortant rules.
# So allow Ruff to be more lenient.
line-length = 120
[tool.black]
line-length = 88
extend-exclude = "pygls/lsp/client.py"
[tool.coverage.run]
parallel = true
source_pkgs = ["pygls"]
[tool.coverage.report]
show_missing = true
skip_covered = true
sort = "Cover"
[tool.mypy]
check_untyped_defs = true
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"