-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
pyproject.toml
94 lines (83 loc) · 2.88 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
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "odin"
version = "2.10"
description = "Data-structure definition/validation/traversal, mapping and serialisation toolkit for Python"
authors = ["Tim Savage <tim@savage.company>"]
license = "BSD-3-Clause"
readme = "README.rst"
repository = "https://github.com/python-odin/odin"
documentation = "https://odin.readthedocs.org"
keywords = ["data-structure", "validation", "data-mapping"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
packages = [
{ include = "odin", from = "src" },
{ include = "tests", format = "sdist" },
]
include = ["src/odin/py.typed"]
[tool.poetry.dependencies]
python = "^3.8"
pyyaml = {version = "*", optional = true }
toml = {version = "*", optional = true }
pint = {version = "*", optional = true }
arrow = {version = "*", optional = true }
msgpack = {version = "*", optional = true }
rich = {version = "*", optional = true }
[tool.poetry.dev-dependencies]
pytest = "^7.0"
pytest-cov = "*"
sphinx = "*"
[tool.poetry.extras]
yaml = ["pyyaml"]
msgpack = ["msgpack"]
toml = ["toml"]
pint = ["pint"]
arrow = ["arrow"]
rich = ["rich"]
[tool.ruff]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.8
target-version = "py38"
[tool.ruff.lint]
select = ["N", "F", "I", "UP", "PL", "A", "G", "S", "E", "SIM", "B"]
ignore = [
"N818", # Exception name should be named with an Error suffix
]
[tool.ruff.lint.per-file-ignores]
"tests/**.py" = [
"S101", # asserts allowed in tests...
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
# The below are debateable
"PLR2004", # Magic value used in comparison, ...
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
]
[tool.ruff.lint.pycodestyle]
max-line-length = 117
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"