-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
126 lines (111 loc) · 2.69 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
[tool.poetry]
name = "dac7"
version = "2024.4.1"
description = "Tooling for DAC7"
readme = "README.md"
license = "LICENSE.md"
authors = [
"Nicolas Bonnotte <[email protected]>",
]
packages = [
{ include = "dac7", from = "cli/src" },
]
include = [
"cli/src/dac7/schemas/*.xsd"
]
[tool.poetry.scripts]
dac7 = "dac7.main:app"
[tool.poetry.dependencies]
python = ">=3.11,<3.14"
typer = "^0.15.0"
xmlschema = "^3.0.0"
pydantic = "^2.5.2"
annotated-types = "^0.7.0"
python-gnupg = "^0.5.2"
requests = "^2.31.0"
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
pytest-cov = "^6.0.0"
mypy = "^1.7.1"
pre-commit = "^4.0.0"
xenon = "^0.9.1"
pytest-mock = "^3.12.0"
pdbpp = "^0.10.3"
virtualenv = "^20.26.2"
types-requests = "^2.31.0"
factory-boy = "^3.3.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.bandit]
exclude_dirs = ["cli/tests"]
skips = []
[tool.black]
line-length = 120
target-version = ["py312"]
[tool.coverage.run]
source = ["cli/src"]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Don't complain if tests don't hit defensive assertion code:
"raise NotImplementedError",
"pragma: no cover", # Coverage is not expected on pytest.fail() calls in tests
".*pytest.fail.*",
]
fail_under = 80
show_missing = true
skip_covered = true
[tool.mypy]
allow_incomplete_defs = false
check_untyped_defs = true
enable_error_code = ["ignore-without-code"]
files = ["dac7"]
mypy_path = ["cli/src", "cli/stubs"]
explicit_package_bases = true
no_implicit_optional = true
python_version = "3.11"
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = []
[tool.pytest.ini_options]
# Make sure that warnings raise errors, to handle things like deprecations as soon as possible.
filterwarnings = ["error"]
[tool.ruff]
fix = true
line-length = 120
target-version = "py312"
[tool.ruff.lint]
fixable = ["I"]
ignore = [
"A003", # line too long (already checked by black)
]
select = [
"YTT", # flake8-2020
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"INP", # flake8-no-pep420
"T20", # flake8-print
"PT", # flake8-pytest-style
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"I", # isort
"C90", # mccabe
"E", # pycodestyle
"W", # pycodestyle
"F", # pyflakes
"PGH", # pygrep-hooks
"RUF", # ruff
]
[tool.ruff.lint.per-file-ignores]
"cli/tests/**/*.py" = ["T201"]
[tool.ruff.lint.isort]
force-single-line = true
lines-between-types = 1
section-order = ["future", "standard-library", "first-party", "third-party", "local-folder"]