-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
154 lines (135 loc) · 3.52 KB
/
pyproject.toml
File metadata and controls
154 lines (135 loc) · 3.52 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
152
153
154
[project]
name = "xml2python"
dynamic = ["version"]
authors = [
{name="Ernesto Ruge, binary butterfly GmbH", email="ernesto.ruge@binary-butterfly.de"},
]
maintainers = [
{name="Ernesto Ruge, binary butterfly GmbH", email="ernesto.ruge@binary-butterfly.de"},
]
description = "xml2python is a simple helper class to transform XML input to more usable python dicts."
readme = "README.md"
requires-python = ">=3.10"
keywords = [
"data",
"xml",
"dict",
]
license-files = ["LICENCE.txt"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
]
dependencies = [
"lxml~=5.4.0",
]
[project.urls]
Homepage = "https://github.com/binary-butterfly/xml2python"
Repository = "https://github.com/binary-butterfly/xml2python.git"
Issues = "https://github.com/binary-butterfly/xml2python/issues"
Changelog = "https://github.com/binary-butterfly/xml2python/blob/main/CHANGELOG.md"
[project.optional-dependencies]
testing = [
"ruff~=0.11.10",
"pytest~=8.3.5",
"pytest-cov~=6.1.1",
]
[build-system]
requires = [
"hatchling~=1.27.0",
"uv-dynamic-versioning~=0.8.2",
]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "uv-dynamic-versioning"
[tool.hatch.build.hooks.version]
path = "src/xml2python/_version.py"
template = '''
version = '{version}'
'''
[tool.uv-dynamic-versioning]
vcs = 'git'
fallback-version = "0.0.0"
[tool.pytest.ini_options]
addopts = "-ra --import-mode=importlib --cov-context=test --cov-report="
testpaths = ["tests"]
python_files = ["*_test.py", "*Test.py"]
python_classes = ["*Test"]
pythonpath = ["src"]
# Fail on warnings
filterwarnings = "error"
[tool.ruff]
lint.select = [
"F", # pyflakes
"I", # isort
"S", # flake8-bandit
"ASYNC", # flake8-async
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"INP", # flake8-no-pep420 (missing __init__.py)
"PIE", # flake8-pie
"T20", # flake8-print
"Q", # flake8-quotes
"TID", # flake8-tidy-imports
"FLY", # flynt (use f-string instead of static join)
]
# Enable preview rules since a lot of basic pycodestyle rules are in preview mode for some reason
preview = true
lint.ignore = [
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"ISC001", # single-line-implicit-string-concatenation - conflicts with formatter
]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"temp",
]
line-length = 120
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = [
# Allow assert
"S101",
# Ignore unsafe practices like hardcoded passwords
"S101", "S105", "S106",
# Don't require __init__.py files
"INP",
]
"dev/*" = [
# Don't require __init__.py files
"INP",
]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
multiline-quotes = "double"
docstring-quotes = "double"
[tool.ruff.format]
quote-style = "single"