Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (132 loc) · 4.33 KB
/
Copy pathpyproject.toml
File metadata and controls
151 lines (132 loc) · 4.33 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
147
148
149
150
151
[tool.pyink]
# Yes, we use the _Black_ style to format _Pyink_ code.
pyink = false
line-length = 88
target-version = ["py310"]
include = '\.pyi?$'
extend-exclude = 'tests/data'
unstable = true
[build-system]
requires = ["hatchling>=1.27.0", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "pyink"
description = "Pyink is a python formatter, forked from Black with slightly different behavior."
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.10"
readme = "README.md"
authors = [{name = "The Pyink Maintainers", email = "pyink-maintainers@google.com"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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 :: Software Development :: Quality Assurance",
]
dependencies = [
"click>=8.0.0",
"mypy-extensions>=0.4.3",
"packaging>=22.0",
"pathspec>=1.0.0",
"platformdirs>=2",
"pytokens~=0.4.0",
"tomli>=1.1.0; python_version<'3.11'",
"typing-extensions>=4.0.1; python_version<'3.11'",
"black==26.10.0",
]
dynamic = ["version"]
[project.optional-dependencies]
colorama = ["colorama>=0.4.3"]
uvloop = [
"uvloop>=0.15.2; sys_platform != 'win32'",
"winloop>=0.5.0; sys_platform == 'win32'",
]
d = ["aiohttp>=3.10"]
jupyter = ["ipython>=7.8.0", "tokenize-rt>=3.2.0"]
[dependency-groups]
hatch = ["hatch==1.15.1", "hatch-fancy-pypi-readme", "hatch-vcs", "virtualenv<21.0.0"]
cibw = ["cibuildwheel==4.1.0"]
pyinstaller = ["pyinstaller"]
dev = [{ include-group = "cov-tests" }, { include-group = "tox" }, "pre-commit"]
cov-tests = [
{ include-group = "coverage" },
{ include-group = "tests" },
"pytest-cov>=4.1.0",
]
docs = [
"docutils==0.22.4",
"furo==2025.12.19",
"myst-parser==5.1.0",
"sphinx-copybutton==0.5.2",
"sphinx==9.1.0",
"sphinxcontrib-programoutput==0.20",
]
tox = ["tox>=4.22"]
tests = ["pytest>=7", "pytest-xdist>=3.0.2"]
coverage = ["coverage>=5.3"]
fuzz = [{ include-group = "coverage" }, "hypothesis", "hypothesmith"]
diff-shades = [
"diff-shades @ https://github.com/ichard26/diff-shades/archive/stable.zip",
]
diff-shades-comment = ["click>=8.1.7", "packaging>=22.0", "urllib3"]
release = ["packaging>=22.0"]
width-table = ["wcwidth==0.2.14"]
[project.scripts]
pyink = "pyink:patched_main"
[project.entry-points."validate_pyproject.tool_schema"]
pyink = "pyink.schema:get_schema"
[project.urls]
Changelog = "https://github.com/google/pyink/blob/pyink/CHANGES.md"
Repository = "https://github.com/google/pyink"
Issues = "https://github.com/google/pyink/issues"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/_pyink_version.py"
template = """
version = "{version}"
"""
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
# Note that we change the behaviour of this flag below
macos-max-compat = true
[tool.pytest.ini_options]
# Option below requires `tests/optional.py`
addopts = "--strict-config --strict-markers"
optional-tests = [
"no_jupyter: run when `jupyter` extra NOT installed",
]
markers = ["incompatible_with_mypyc: run when testing mypyc compiled black"]
xfail_strict = true
filterwarnings = ["error"]
[tool.mypy]
# Specify the target platform details in config, so your developers are
# free to run mypy on Windows, Linux, or macOS and get consistent
# results.
python_version = "3.10"
mypy_path = "src"
strict = true
# Unreachable blocks have been an issue when compiling mypyc, let's try to avoid 'em in the first place.
warn_unreachable = true
implicit_reexport = true
show_error_codes = true
show_column_numbers = true
[[tool.mypy.overrides]]
module = ["pathspec.*", "IPython.*", "colorama.*", "tokenize_rt.*", "uvloop.*"]
ignore_missing_imports = true
# CI only checks src/, but in case users are running LSP or similar we explicitly ignore
# errors in test data files.
[[tool.mypy.overrides]]
module = ["tests.data.*"]
ignore_errors = true