Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
146 lines (131 loc) · 4.21 KB
/
Copy pathpyproject.toml
File metadata and controls
146 lines (131 loc) · 4.21 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
[build-system]
requires = ["uv_build>=0.8"]
build-backend = "uv_build"
[project]
name = "devtools"
version = "0.13.0"
description = "Python's missing debug print command, and more."
authors = [{name = "Samuel Colvin", email = "s@muelcolvin.com"}]
license = "MIT"
license-files = ["LICENSE"]
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Operating System :: Unix",
"Operating System :: POSIX :: Linux",
"Environment :: Console",
"Environment :: MacOS X",
"Framework :: Pydantic",
"Framework :: Pydantic :: 2",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet",
"Typing :: Typed",
]
requires-python = ">=3.10"
dependencies = [
"executing>=1.1.1",
"asttokens>=2.0.0,<3.0.0",
"Pygments>=2.15.0",
]
# keep this meaningless group around to avoid breaking installs using `pip install devtools[pygments]`
optional-dependencies = {pygments = [] }
[project.urls]
Homepage = "https://github.com/samuelcolvin/python-devtools"
Documentation = "https://python-devtools.helpmanual.io"
Funding = "https://github.com/sponsors/samuelcolvin"
Source = "https://github.com/samuelcolvin/python-devtools"
Changelog = "https://github.com/samuelcolvin/python-devtools/releases"
[tool.uv]
default-groups = ["dev", "docs"]
[tool.uv.build-backend]
module-root = ""
[dependency-groups]
dev = [
"basedpyright>=1.40.2",
"coverage[toml]",
"pytest>=8",
"pytest-mock",
"pytest-pretty",
"ruff>=0.17.0",
# these packages are used in tests so install the latest version
"asyncpg",
"multidict",
"numpy",
"pydantic",
"sqlalchemy",
]
docs = [
"ansi2html",
"zensical",
]
[tool.pytest.ini_options]
testpaths = "tests"
filterwarnings = "error"
[tool.coverage.run]
source = ["devtools"]
branch = true
omit = ["devtools/__main__.py"]
relative_files = true
context = "${CONTEXT}"
[tool.coverage.report]
precision = 2
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"raise NotImplemented",
"if TYPE_CHECKING:",
"if MYPY:",
"@overload",
]
[tool.coverage.paths]
source = [
"devtools/",
"/home/runner/work/python-devtools/python-devtools/devtools/",
"/Users/runner/work/python-devtools/python-devtools/devtools/",
"D:\\a\\python-devtools\\python-devtools\\devtools",
]
[tool.ruff]
line-length = 120
include = ["devtools/**/*.py", "tests/**/*.py", "docs/build.py"]
[tool.ruff.lint]
extend-select = [
"Q", # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
"RUF100", # https://docs.astral.sh/ruff/rules/unused-noqa/
"C90", # https://docs.astral.sh/ruff/rules/#mccabe-c90
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"FA", # https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
]
# devtools must never raise from inside a debug call, so catching bare `Exception` is intentional
ignore = ["BLE001"]
flake8-quotes = { inline-quotes = "single", multiline-quotes = "double" }
mccabe = { max-complexity = 14 }
[tool.ruff.lint.per-file-ignores]
# deliberately odd expressions whose source rendering is under test
"tests/test_expr_render.py" = ["PLR0133", "SIM222"]
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["devtools"]
[tool.ruff.format]
docstring-code-format = true
quote-style = "single"
# source expressions in this file are reproduced verbatim in expected output, so formatting would break the tests
exclude = ["tests/test_expr_render.py"]
[tool.pyright]
pythonVersion = "3.10"
typeCheckingMode = "strict"
reportUnnecessaryTypeIgnoreComment = true
venv = ".venv"
include = ["devtools", "tests", "docs/build.py"]