-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpyproject.toml
172 lines (143 loc) · 3.99 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
[tool.poetry]
name = "pyasice"
version = "1.2.0"
description = "Manipulate ASiC-E containers and XAdES/eIDAS signatures for Estonian e-identity services"
readme = "README.md"
license = "ISC"
authors = [
"Thorgate <[email protected]>",
"Yuri Shatrov <[email protected]>",
]
maintainers = [
"Jyrno Ader <[email protected]>",
"Jorgen Ader <[email protected]>",
]
repository = "https://github.com/thorgate/pyasice"
homepage = "https://github.com/thorgate/pyasice"
keywords=[
"esteid",
"asice",
"smartid",
"mobile-id",
"idcard"
]
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: ISC License (ISCL)",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
]
packages = [
{ include = "pyasice" },
]
include = [
"pyasice/templates/*.xml"
]
exclude = [
"pyasice/__pycache__",
"pyasice/tests",
]
[[tool.poetry.source]]
name = "the_pypi"
url = "https://pypi.org/simple"
default = true
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = ">=3.7,<4.0"
lxml = ">=4,<5"
oscrypto = "*"
asn1crypto = "*"
cryptography = ">=5"
requests = ">=2.20"
[tool.poetry.dev-dependencies]
pytest = "7.*"
coverage = "5.*"
coveralls = "2.*"
pytest-cov = ">=2.8.1"
pylint = "*"
ruff = "^0.1.5"
[tool.ruff]
target-version = "py38"
line-length = 140
show-fixes = true
cache-dir = "~/.cache/ruff"
exclude = [
".git",
".mypy_cache",
"_build",
"build",
"dist",
"docs",
"cover",
]
select = ["ALL"] # See https://docs.astral.sh/ruff/rules/ for a complete list of available rules
ignore = [
"D211", # no-blank-line-before-class
"D213", # multi-line-summary-second-line
"COM812", # Trailing comma missing
"ISC001", # Single line implicit string concatenation
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = [
"RUF100", # Don't remove unused noqa comments automatically
]
# The following rules are native re-implementations in ruff.
# The listed tools are not actually run, and configuration only affects ruff.
# Some of the tools are already part of our pipeline, but will hopefully be replaced by ruff in the future.
[tool.ruff.mccabe]
max-complexity = 22
[tool.ruff.isort]
# This configuration is equivalent to our current isort configuration and `ruff --select I ." should be equivalent to `isort .`
section-order = ["future", "standard-library", "django", "pytest", "third-party", "first-party", "local-folder"]
lines-after-imports = 2
order-by-type = false
known-first-party = ["pyasice"]
[tool.ruff.isort.sections]
django = ["django"]
pytest = ["pytest"]
# Pylint parity can be seen in https://github.com/astral-sh/ruff/issues/970
[tool.ruff.pylint]
max-branches = 20
max-args = 6
max-returns = 8
[tool.ruff.flake8-builtins]
builtins-ignorelist = [
"filter",
"help",
"id",
"list",
"object",
"type",
]
[tool.ruff.flake8-import-conventions]
banned-from = ["typing"]
[tool.ruff.flake8-import-conventions.aliases]
"typing" = "t"
[tool.ruff.flake8-import-conventions.banned-aliases]
#"django.utils.translation.gettext" = ["_"]
#"django.utils.translation.gettext_lazy" = ["_"]
#"django.utils.translation.pgettext" = ["_"]
#"django.utils.translation.pgettext_lazy" = ["_"]
#"django.utils.translation.ngettext" = ["_"]
#"django.utils.translation.ngettext_lazy" = ["_"]
[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"
[tool.ruff.lint.flake8-pytest-style]
parametrize-names-type = "csv"
[tool.coverage.run]
branch = true
omit = ["*test*"]