-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
122 lines (104 loc) · 3.51 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "pre_commit_hooks"
description = "A selection of pre-commit hooks for pre-commit.com."
readme = "README.md"
requires-python = ">=3.10"
license = "GPL-3.0-or-later"
keywords = ["pre-commit"]
authors = [{ name = "adehad", email = "[email protected]" }]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = []
dynamic = ["version"]
[project.urls]
Documentation = "https://github.com/adehad/pre-commit-hooks/#readme"
Issues = "https://github.com/adehad/pre-commit-hooks/issues"
Source = "https://github.com/adehad/pre-commit-hooks/"
[project.scripts]
check-header-footer = "pre_commit_hooks.check_header_footer:main"
arabic-presentation-form = "pre_commit_hooks.arabic_presentation_form:main"
[tool.hatch.build]
sources = ["src"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/_version.py" # Do not commit to source
########################################################################################
# Default environment
########################################################################################
[tool.hatch.envs.default]
python = "3.10"
dependencies = [
# Lint
"pre-commit>=1.17.0",
# Docs
"furo",
"sphinx",
"sphinx_copybutton",
# Tests
"pytest",
"pytest-cov",
]
[tool.hatch.envs.default.scripts]
cov = "pytest -vv --cov-report=term-missing --cov-config=pyproject.toml --cov=src/pre_commit_hooks --cov=tests {args}"
no-cov = "cov --no-cov {args}"
docs = "sphinx-build -a -n -v -W --keep-going -b html --color -d build/docs/doctree docs/ build/docs/out"
lint = "python -m pre_commit run --color=always {args:--all-files}"
########################################################################################
# Tests
########################################################################################
[[tool.hatch.envs.test.matrix]]
python = ["310", "311"]
########################################################################################
# External Tool Config
########################################################################################
[tool.mypy]
python_version = '3.10'
strict = true
ignore_missing_imports = true
namespace_packages = true
show_error_codes = true
strict_optional = true
warn_unused_configs = true
exclude = ["tests/"]
[tool.coverage.run]
branch = true
parallel = true
omit = ["src/pre_commit_hooks/__about__.py"]
[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"W", # pycodestyle
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"D", # docstrings
"RUF", # ruff
]
ignore = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff]
# Same as Black.
line-length = 88
# Assume Python 3.10. (minimum supported)
target-version = "py310"
# The source code paths to consider, e.g., when resolving first- vs. third-party imports
src = ["pre_commit_hooks", "tests"]
[tool.ruff.lint.isort]
known-first-party = ["pre_commit_hooks", "tests"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"