-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
141 lines (128 loc) · 3.86 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
[build-system]
build-backend = "pdm.backend"
requires = [
"pdm-backend",
]
[project]
name = "sync-pre-commit-lock"
description = "PDM plugin to sync your pre-commit versions with your lockfile, and install them, all automatically."
readme = "README.md"
license = { file = "LICENSE" }
authors = [ { name = "Gabriel Dugny", email = "sync-pre-commit-lock@dugny.me" } ]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Environment :: Plugins",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
dynamic = [
"version",
]
dependencies = [
"packaging>=24.1",
"strictyaml>=1.7.3",
"tomli>=2; python_version<'3.11'",
"typing-extensions; python_version<'3.10'",
]
optional-dependencies.pdm = [
"pdm>=2.7.4",
]
optional-dependencies.poetry = [
"poetry>=1.6",
]
urls."Bug Tracker" = "https://github.com/GabDug/sync-pre-commit-lock/issues"
urls."Changelog" = "https://github.com/GabDug/sync-pre-commit-lock/releases"
urls."Homepage" = "https://github.com/GabDug/sync-pre-commit-lock"
entry-points.pdm.pdm-sync-pre-commit-lock = "sync_pre_commit_lock.pdm_plugin:register_pdm_plugin"
entry-points."poetry.application.plugin".poetry-sync-pre-commit-lock = "sync_pre_commit_lock.poetry_plugin:SyncPreCommitLockPlugin"
[tool.pdm]
plugins = [
"-e .",
]
[tool.pdm.version]
source = "scm"
write_to = "sync_pre_commit_lock/_version.py"
write_template = "__version__: str = \"{}\"\n"
[tool.pdm.scripts]
fmt = { cmd = "ruff format .", help = "Run ruff formatter" }
lint-mypy = { cmd = "mypy src", help = "Run mypy type checker" }
# XXX(dugab): run mypy on tests as well
lint-ruff = { cmd = "ruff check .", help = "Run ruff linter" }
test-cov = { cmd = "pytest --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html --cov-report=term-missing", help = "Run tests with coverage" }
test-all = { cmd = "tox", help = "Test against all supported versions" }
test = { cmd = "pytest", help = "Run the test suite" }
[tool.pdm.dev-dependencies]
dev = [
"PyYAML>=6.0.1",
"mypy>=1.4.1",
"ruff>=0.0.275",
"types-PyYAML>=6.0.12.10",
"pytest>=7.4.0",
"pytest-mock>=3.11.1",
"pytest-cov>=4.1.0",
"pre-commit>=3.3.3",
"tomli>=2.0.1",
"tox-gh>=1.3.1",
"tox-pdm>=0.7.2",
"tox>=4.14.2",
"tox-uv>=1.7.0",
]
testtox = [
"pytest>=8.1.1",
"pytest-cov>=5.0.0",
"pytest-mock>=3.14.0",
"PyYAML>=6.0.1",
]
[tool.ruff]
line-length = 120
respect-gitignore = true
lint.extend-select = [ "D202", "D209", "EM101", "I001", "PTH", "PYI", "Q000", "RET", "S", "T", "TCH" ]
lint.extend-ignore = [ "S101" ]
[tool.pyproject-fmt]
max_supported_python = "3.13"
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = [ "tests" ]
norecursedirs = "*.egg .eggs dist build docs .tox .git __pycache__ node_modules .venv __pypackages__"
addopts = "-ra --log-disable unearth.evaluator --log-disable unearth.collector --log-disable unearth.auth --log-disable pdm.termui"
[tool.coverage.paths]
source = [
"src",
]
[tool.coverage.run]
branch = true
parallel = true
include = [ "src/*" ]
omit = [ "*/tests/*" ]
source = [ "src", "tests" ]
[tool.coverage.report]
show_missing = true
precision = 2
exclude_lines = [
"def __repr__",
"if TYPE_CHECKING:",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
'class .*\bProtocol\):',
'@(abc\.)?abstractmethod]',
"except ImportError:",
"# nocov",
]
[tool.mypy]
files = [ "src" ]
strict = true
[[tool.mypy.overrides]]
module = "strictyaml"
ignore_missing_imports = true