-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
125 lines (104 loc) · 2.4 KB
/
pyproject.toml
File metadata and controls
125 lines (104 loc) · 2.4 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
[build-system]
requires = ["uv_build>=0.8.8,<0.9.0"]
build-backend = "uv_build"
[project]
name = "pyslang-stubs"
version = "10.0.0.20260320"
description = "Typing stubs for the excellent pyslang library"
readme = "README.md"
authors = [
{ name = "allRisc", email = "allrisc.dev@gmail.com" }
]
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3",
"Typing :: Stubs Only"
]
requires-python = ">=3.9"
dependencies = [
"typing-extensions>=4.15.0",
]
[project.urls]
Homepage = "https://github.com/RISCY-Lib/pyslang-stubs"
[dependency-groups]
dev = [
"ruff>=0.12.8",
"tox>=4.25.0",
"tox-uv>=1.13.1",
"mypy>=1.4.1",
"pyslang==10.0.0",
"pybind11-stubgen>=2.5.5",
"pytest>=8.4.1",
]
[tool.uv]
default-groups = ["dev"]
[tool.mypy]
warn_return_any = true
python_version = "3.9"
files = ["src"]
pretty = true
[tool.pyright]
pythonVersion = "3.9"
include = ["src"]
typeCheckingMode = "basic"
[tool.ruff]
line-length = 100
indent-width = 4
target-version = "py39"
show-fixes = true
src = ["src"]
exclude = ["tests/**.py"] # TODO: Update to include all test files
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"E", # pycodestyle error
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"W", # pycodestyle warning
]
ignore = [
"UP038", # keep isinstance tuple
]
[tool.tox]
env_list = [
"py3.13", "py3.12", "py3.11", "py3.10", "py3.9",
"style",
"typing",
"stubs",
]
[tool.tox.env_run_base]
description = "pytest on latest dependency versions"
runner = "uv-venv-lock-runner"
package = "wheel"
wheel_build_env = ".pkg"
constrain_package_deps = true
use_frozen_constraints = true
dependency_groups = ["dev"]
commands = [[
"pytest", "-v", "--tb=short", "--basetemp={env_tmp_dir}",
{replace = "posargs", default = [], extend = true},
]]
[tool.tox.env.style]
description = "run linting and style checks on code"
dependency_groups = ["dev"]
skip_install = true
commands = [["ruff", "check"]]
[tool.tox.env.typing]
description = "run static type checkers"
dependency_groups = ["dev"]
commands = [
["mypy"],
]
[tool.tox.env.stubs]
description = "run stub checking"
dependency_groups = ["dev"]
set_env = {MYPYPATH = "./stubs/"}
commands = [
["stubtest", "pyslang", "--allowlist", "allowlist.txt"]
]