@@ -60,10 +60,9 @@ keywords = [
6060 "{{ package_name }}"
6161]
6262
63-
6463[project.optional-dependencies]
6564test = ["pytest"]
66- dev = ["pytest", "black", " ruff", "pre-commit"]
65+ dev = ["pytest", "ruff", "pre-commit", "coverage "]
6766
6867[project.urls]
6968Repository = "{{ repository_url }}"
@@ -74,17 +73,25 @@ Homepage = "{{ repository_url }}"
7473requires = ["hatchling"]
7574build-backend = "hatchling.build"
7675
77- [tool.hatch.build.targets.wheel]
78- packages = ["{{ package_name }}"]
76+ [tool.hatch.envs.test]
77+ features = ["test"]
78+ installer = "uv"
7979
80- [tool.black]
81- line-length = 100
82- target-version = [
83- {% - for target in black_target_versions (python_min_version , python_max_version ) %}
84- '{{ target }}',
80+ [[tool.hatch.envs.test.matrix]]
81+ python = [
82+ {% - for version in py_versions_range (python_min_version , python_max_version ) %}
83+ "{{ version }}",
8584{% - endfor %}
8685]
8786
87+ [tool.hatch.envs.test.scripts]
88+ test = "pytest {args}"
89+ coverage = "coverage run -m pytest {args}"
90+
91+
92+ [tool.hatch.build.targets.wheel]
93+ packages = ["{{ package_name }}"]
94+
8895[tool.ruff]
8996line-length = 100
9097
@@ -158,32 +165,9 @@ ignore = [
158165 "UP007",
159166 "UP038",
160167]
161- isort = { known-first-party = ["{{ package_name }}", 'tests'] }
162- pydocstyle = { convention = 'google' }
163-
164168exclude = [
165- ".bzr",
166- ".direnv",
167- ".eggs",
168- ".git",
169- ".hg",
170- ".mypy_cache",
171- ".nox",
172- ".pants.d",
173- ".pytype",
174- ".ruff_cache",
175- ".svn",
176- ".tox",
177- ".venv",
178- "__pypackages__",
179- "_build",
180- "buck-out",
181169 "build",
182- "dist",
183- "node_modules",
184- "venv",
185- "tests/*",
186- "tests/**/*",
170+ "tests/**",
187171]
188172
189173[tool.ruff.lint.per-file-ignores]
@@ -196,18 +180,20 @@ exclude = [
196180quote-style = "double"
197181indent-style = "space"
198182skip-magic-trailing-comma = false
199- line-ending = "auto "
183+ line-ending = "lf "
200184
201- [tool.hatch.envs.test]
202- features = ["test"]
203- installer = "uv"
185+ [tool.ruff.lint.isort]
186+ known-first-party = ["{{ package_name }}", "tests"]
204187
205- [[tool.hatch.envs.test.matrix]]
206- python = [
207- {% - for version in py_versions_range (python_min_version , python_max_version ) %}
208- "{{ version }}",
209- {% - endfor %}
210- ]
188+ [tool.ruff.lint.pydocstyle]
189+ convention = "google"
211190
212- [tool.hatch.envs.test.scripts]
213- test = "pytest -v"
191+ [tool.coverage.run]
192+ source = ["{{ package_name }}"]
193+ branch = true
194+
195+ [tool.coverage.report]
196+ omit = [
197+ "tests/*",
198+ "tests/**",
199+ ]
0 commit comments