-
-
Notifications
You must be signed in to change notification settings - Fork 106
/
pyproject.toml
109 lines (93 loc) · 2.98 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
108
109
[tool.poetry]
name = "pygls"
version = "2.0.0a2"
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"
# You may want to use the Poetry "Up" plugin to automatically update all dependencies to
# their latest major versions. But bear in mind that this is a library, so the non-development
# dependency versions will be forced on downstream users. Therefore the very latest versions
# may be too restrictive.
# See https://github.com/MousaZeidBaker/poetry-plugin-up
[tool.poetry.dependencies]
python = ">=3.9"
cattrs = ">=23.1.2"
lsprotocol = "2024.0.0b1"
websockets = { version = ">=13.0", optional = true }
[tool.poetry.extras]
ws = ["websockets"]
[tool.poetry.group.dev.dependencies]
# Replaces (amongst many other things) flake8 and bandit
ruff = ">=0.1.6"
poethepoet = ">=0.24.4"
mypy = ">=1.7.1"
black = "^24.4.1"
[tool.poetry.group.test.dependencies]
# Note: `coverage` requires that your Python was built with system `sqlite` development files
coverage = { version = ">=7.3.2", extras = ["toml"] }
pytest = ">=7.4.3"
pytest-asyncio = ">=0.21.0"
pytest-cov = ">=5"
[tool.poetry.group.docs.dependencies]
# TODO `sphinx>=7.26` needs python 3.9
myst-parser = ">=2.0"
sphinx = ">=7.1.2"
sphinx-design = ">=0.5.0"
sphinx-rtd-theme = ">=1.3.0"
[tool.pytest.ini_options]
asyncio_mode = "auto"
[tool.poe.tasks]
test-pyodide = "pytest tests/e2e --lsp-runtime pyodide"
ruff = "ruff check ."
mypy = "mypy -p pygls"
check_generated_code = "python scripts/check_generated_code_is_uptodate.py"
check_commit_style = "npx commitlint --from origin/main --to HEAD --verbose --config commitlintrc.yaml"
generate_code = "python scripts/generate_code.py pygls/lsp"
generate_contributors_md = "python scripts/generate_contributors_md.py"
black_check = "black --check ."
poetry_lock_check = "poetry check"
[tool.poe.tasks.test]
sequence = [
{ cmd = "pytest --cov" },
{ cmd = "pytest tests/e2e --lsp-transport tcp" },
{ cmd = "pytest tests/e2e --lsp-transport websockets" },
]
ignore_fail = "return_non_zero"
[tool.poe.tasks.lint]
sequence = [
"ruff",
"mypy",
"check_generated_code",
"check_commit_style",
"black_check",
"poetry_lock_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/_base_.*.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"