-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
83 lines (71 loc) · 2.45 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
# We still use poetry officially, but gradually switching to uv. So the next two
# sections are only partially "active". When `uv` gets dependabot, we'll make
# the full transition.
[project]
name = "pytest-accept"
description = "A pytest-plugin for updating doctest outputs"
dependencies = ["astor>=0.8.1", "pytest>=7"]
requires-python = ">=3.9, <4"
authors = [{ name = "Maximilian Roos", email = "[email protected]" }]
license = "Apache-2.0"
readme = "README.md"
dynamic = ["version"]
urls = { homepage = "https://github.com/max-sixty/pytest-accept", repository = "https://github.com/max-sixty/pytest-accept" }
[dependency-groups]
dev = ["astor", "blackdoc", "mypy", "pre-commit", "ruff"]
[tool.poetry]
# Defined by poetry-dynamic-versioning
version = "0"
[tool.poetry-dynamic-versioning]
enable = true
pattern = 'v?(?P<base>[\d\.]+)'
# PyPI doesn't like commits being in the version
# Adjusted from https://github.com/mtkennerly/poetry-dynamic-versioning, no
# commit hash to make it compatible with test-pypi
format-jinja = "{% if distance == 0 %}{{ base }}{% else %}{{ base }}.dev{{ distance }}{% endif %}"
# format = "{base}.{distance}"
[project.entry-points."pytest11"]
accept = "pytest_accept"
[tool.poetry.dependencies]
pytest = ">=7"
python = ">=3.9, <4"
[tool.poetry.group.dev.dependencies]
astor = "^0.8.1"
# Keep versions of these five up to date with .pre-commit-config.yaml
blackdoc = "^0.3.4"
mypy = "^1.8"
pre-commit = "^4"
ruff = "^0.8"
# Currently causing Windows to break on 3.10
# pdbpp = "^0.10.3"
[tool.pytest.ini_options]
addopts = ["--strict-config", "--strict-markers", "--doctest-modules"]
doctest_optionflags = "NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ELLIPSIS"
filterwarnings = ["error:::pytest_accept.*"]
pytester_example_dir = "examples"
testpaths = ["pytest_accept"]
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.2", "poetry-dynamic-versioning"]
[tool.ruff]
fix = true
[tool.ruff.lint]
ignore = [
# ignores from `flak8`, though possibly ruff doesn't enforce those that
# conflict with black?
"E402", # module level import at top — too strict in some cases
"E501", # line too long - defer to `black`
"E731", # No lambdas — too strict
]
select = [
"F", # Pyflakes
"E", # Pycodestyle
"W",
"TID", # flake8-tidy-imports (absolute imports)
"I", # isort
"UP", # Pyupgrade
]
[tool.mypy]
files = "."
# TODO: ideally we would list the modules that aren't yet typed
ignore_missing_imports = true