-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
140 lines (125 loc) · 3.28 KB
/
pyproject.toml
File metadata and controls
140 lines (125 loc) · 3.28 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
### BUILD SYSTEM ###
# NOTE: See https://peps.python.org/pep-0621/
[project]
name = "bitstructures"
description="Bit Structures"
authors=[{name="WibblyGhost"}]
dynamic = ["version", "readme"]
requires-python= ">=3.13"
urls = {url = "https://github.com/WibblyGhost/bitstructures"}
dependencies = [
"bitarray>=3.8.0",
]
[dependency-groups]
dev = [
"faker>=33.3.1",
"mypy>=1.14.1",
"pre-commit>=4.0.0",
"pytest>=8.3.4",
"pytest-asyncio>=0.25.2",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"pytest-timeout>=2.3.1",
"ruff>=0.9.1",
"mypy-gitlab-code-quality>=1.1.0",
"scapy>=2.6.1",
]
build = [
"setuptools>=60",
"setuptools-git-versioning>=2.1.0",
]
[build-system]
requires = ["setuptools>=60", "setuptools-git-versioning"]
build-backend = "setuptools.build_meta"
[tool.setuptools-git-versioning]
enabled = true
dev_template = "{tag}"
dirty_template = "{tag}"
[tool.setuptools.dynamic]
readme = {file = "README.md"}
[tool.setuptools.packages.find]
where = ["src"]
exclude = ["*tests*"]
[tool.setuptools.package-data]
"pkgname" = ["py.typed"]
### BUILD SYSTEM ###
[tool.ruff]
line-length = 100
target-version = "py313"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
"D", # pydocstyle
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"R", # refactor
"ASYNC", # flake8-async
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-buildins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"LOG", # flake8-logging
"PT", # felake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"FIX", # flake8-fixme
"PL", # pylint
"RUF", # ruff
]
fixable = ["ALL"]
ignore = [
"D100", # Docstring in public module
"D102", # Docstring in public method
"D203", # Blank line before class
"D104", # Docstring in public package
"D105", # Docstring in magic method
"D212", # Multiline Docstring Start
"D205", # Line between summary and description
"D401", # Docstring imperative mood
"D107", # Docstring in __init__ # We use the public class docstrings
]
isort.split-on-trailing-comma = false
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["SLF001", "PT013"]
"typing.py" = ["D101", "D107"]
"exceptions.py" = ["D101", "D107"]
[tool.ruff.format]
# skip-magic-trailing-comma = true
[tool.mypy]
exclude = [".*tests/", "test.py"]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
extra_checks = true
implicit_optional = true
no_implicit_reexport = true
no_warn_no_return = true
strict_equality = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.pytest.ini_options]
addopts = "--cov --cov-report=xml --cov-report=term --cov-report=html" # --cov-fail-under=100
pythonpath = ["src"]
testpaths = ["tests"]
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
source = ["src"]
[tool.coverage.report]
omit = [
"*/__init__.py",
"*/tests/*",
]