-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
91 lines (74 loc) · 2.57 KB
/
pyproject.toml
File metadata and controls
91 lines (74 loc) · 2.57 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
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "pre_commit_images"
description = "Image optimization and manipulation with hooks for pre-commit."
authors = [{ name = "Raphael Boidol", email = "[email protected]" }]
urls = { "Respository" = "https://github.com/boidolr/pre-commit-images" }
license = { file = "LICENSE" }
readme = "README.md"
version = "1.11.1"
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
]
requires-python = ">=3.10,<3.15"
dependencies = ["pillow==12.1.1"]
[project.optional-dependencies]
svg = ["scour==0.38.2"]
[dependency-groups]
dev = ["ruff", "ty", "tox", "tox-uv"]
tests = ["pytest>=9", "pytest-cov", "pytest-clarity", "pytest-ruff", "pytest-ty"]
[project.scripts]
optimize-avif = "pre_commit_images.optimize_avif:main"
optimize-jpg = "pre_commit_images.optimize_jpg:main"
optimize-png = "pre_commit_images.optimize_png:main"
optimize-svg = "pre_commit_images.optimize_svg:main"
optimize-webp = "pre_commit_images.optimize_webp:main"
resize = "pre_commit_images.resize:main"
[tool.setuptools]
packages = ["pre_commit_images"]
[tool.ruff]
line-length = 120
fix = true
[tool.ruff.lint]
select = ["ALL"]
ignore = ["D", "EXE001", "BLE001", "COM812", "T201"]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["S101"]
[tool.ruff.lint.flake8-annotations]
ignore-fully-untyped = true
[tool.ruff.lint.isort]
force-single-line = true
order-by-type = false
[tool.coverage.run]
core = "sysmon"
[tool.pytest.ini_options]
addopts = ["--ruff", "--ty", "--cov=pre_commit_images", "--cov-fail-under=80"]
testpaths = ["tests", "pre_commit_images"]
filterwarnings = [
"error",
"ignore:Can't use core=sysmon. sys.monitoring isn't available in this version:coverage.exceptions.CoverageWarning",
]
[tool.tox]
requires = ["tox>=4.31.0", "tox-uv>=1.29.0"]
envlist = ["py310", "py311", "py312", "py313", "py314", "py314t", "pre-commit"]
isolated_build = true
[tool.tox.env_run_base]
description = "Run test under {base_python}"
commands = [["pytest", { replace = "posargs", default = [], extend = true }]]
extras = ["svg"]
dependency_groups = ["tests"]
runner = "uv-venv-lock-runner"
uv_sync_flags = ["--no-editable"]
[tool.tox.env.pre-commit]
description = "run commit hooks on code base"
skip_install = true
deps = ["prek"]
commands = [["prek", "run", "--all-files"]]
runner = "virtualenv"
[tool.tox.env.static]
commands = [["pytest", "--ignore", "tests"]]