-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
150 lines (128 loc) · 2.96 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
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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "inifix"
version = "5.1.3"
description = "An I/O library for Pluto-style ini files."
authors = [
{ name = "C.M.T. Robert" },
]
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Typing :: Typed",
]
requires-python = ">=3.10"
dependencies = [
"typing-extensions>=4.2.0 ; python_full_version < '3.11'",
]
[project.license]
text = "GPL-3.0"
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.scripts]
inifix-format = "inifix.format:main"
inifix-validate = "inifix.validate:main"
[project.urls]
Homepage = "https://github.com/neutrinoceros/inifix"
Changelog = "https://github.com/neutrinoceros/inifix/blob/main/CHANGELOG.md"
[dependency-groups]
test = [
"hypothesis>=6.110.0",
"pytest>=6.1",
]
concurrency = [
{include-group = "test"},
"pytest-repeat>=0.9.3",
]
covcheck = [
{include-group = "test"},
"coverage[toml]>=6.5.0 ; python_version == '3.10'",
"coverage>=6.5.0 ; python_version >= '3.11'",
]
typecheck = [
"mypy>=1.11.2",
"pyright>=1.1.390",
]
[tool.hatch]
version.source = "vcs"
[tool.hatch.build.targets.sdist]
only-include = [
"src",
"tests",
"LICENSE",
"CHANGELOG.md",
"README.md",
]
[tool.hatch.build.hooks.vcs]
version-file = "src/inifix/_version.py"
template = '''
# This file is automatically generated by Hatch
from typing import Final
__all__ = ["__version__", "__version_tuple__"]
__version__: Final = {version!r}
__version_tuple__: tuple[int, int, int] = {version_tuple!r}
'''
[tool.ruff.lint]
exclude = ["*__init__.py"]
ignore = ["E501"]
select = [
"E",
"F",
"W",
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"YTT", # flake8-2020
"I", # isort
"UP", # pyupgrade
"RUF022" # unsorted-dunder-all
]
[tool.ruff.lint.isort]
known-first-party = ["inifix"]
[tool.coverage.run]
branch = true
source = [
"src/inifix",
"tests",
]
omit = [
"scripts/*",
]
[tool.coverage.report]
show_missing = true
skip_covered = false
exclude_lines = [
# a more strict default pragma
"\\# pragma: no cover\\b",
# allow defensive code
"^\\s*raise NotImplementedError\\b",
": \\.\\.\\.(\\s*#.*)?$",
"^ +\\.\\.\\.$",
"-> ['\"]?NoReturn['\"]?:",
]
[tool.pyright]
reportImplicitStringConcatenation = false
# allow defensive code
reportUnreachable = false
reportUnnecessaryIsInstance = false
reportUnnecessaryComparison = false
[tool.mypy]
python_version = "3.10"
show_error_codes = true
warn_unused_configs = true
warn_unused_ignores = true
warn_unreachable = true
show_error_context = true
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
[tool.pytest.ini_options]
minversion = "6.0"
filterwarnings = [
"error",
"ignore:assertions not in test modules or plugins will be ignored:UserWarning",
]
addopts = "-ra"