forked from allisonkarlitskaya/systemd_ctypes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
107 lines (94 loc) · 3.04 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
[build-system]
requires = ["flit_core >=3.7,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "systemd_ctypes"
authors = [{name = "Allison Karlitskaya", email = "[email protected]"}]
readme = "README.md"
license = {file = "COPYING"}
classifiers = ["License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)"]
dynamic = ["version", "description"]
[project.urls]
Home = "https://github.com/allisonkarlitskaya/systemd_ctypes/"
[tool.mypy]
mypy_path = 'src'
[tool.pytest.ini_options]
pythonpath = ["src"]
log_cli = true
[tool.ruff]
line-length = 118
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D300", # pydocstyle: Forbid ''' in docstrings
"DTZ", # flake8-datetimez
"E", # pycodestyle
"EXE", # flake8-executable
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PLE", # pylint errors
"PGH", # pygrep-hooks
"PT", # flake8-pytest-style
"RSE", # flake8-raise
"RUF", # ruff rules
"T10", # flake8-debugger
"TCH", # flake8-type-checking
"W", # warnings (mostly whitespace)
"YTT", # flake8-2020
]
ignore = [
"A003", # Class attribute is shadowing a python builtin
"B905", # `zip()` without an explicit `strict=` parameter
"PT009", # Use a regular `assert` instead of unittest-style `assertEqual`
"PT017", # Found assertion on exception `exc` in `except` block, use `pytest.raises()` instead
]
[tool.ruff.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
[tool.ruff.isort]
known-first-party = ["systemd_ctypes"]
[tool.coverage.paths]
source = ["src", "*/site-packages"]
[tool.coverage.run]
source_pkgs = ["systemd_ctypes"]
branch = true
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover", # default
"raise NotImplementedError",
]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = mypy,pycodestyle,ruff,pytest
isolated_build = True
# The default test environments use system packages and never PyPI.
[testenv:{mypy,pycodestyle,ruff,pytest,pkg}]
sitepackages = True
install_command = python3 -m pip install --no-index --no-build-isolation {opts} {packages}
wheel_build_env = pkg
# All other environments (names like py311-mypy, py36-pytest, etc) are isolated
# from the system and get their packages from PyPI, according to the specific
# test environment being requested. We build the wheel in a common environment.
[testenv]
package = wheel
wheel_build_env = venv-pkg
skip_install = mypy,pycodestyle,ruff: True
deps =
pytest,mypy: pytest-cov
pytest,mypy: python-dbusmock
mypy: mypy
pycodestyle: pycodestyle
ruff: ruff
commands =
pytest: python3 -m pytest -opythonpath= {posargs:--cov}
ruff: python3 -m ruff {posargs:src test}
mypy: python3 -m mypy {posargs:src test}
pycodestyle: python3 -m pycodestyle --max-line-length=118 {posargs:src test}
"""