Skip to content

Commit e1dccc5

Browse files
authored
fix: minor touchup to template (#751)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 78f73a1 commit e1dccc5

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

{{cookiecutter.project_name}}/.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
rev: "1.20.0"
1111
hooks:
1212
- id: blacken-docs
13-
additional_dependencies: [black==25.*]
13+
additional_dependencies: [black==26.*]
1414

1515
- repo: https://github.com/pre-commit/pre-commit-hooks
1616
rev: "v6.0.0"
@@ -46,7 +46,7 @@ repos:
4646
rev: "v0.15.4"
4747
hooks:
4848
- id: ruff-check
49-
args: ["--fix", "--show-fixes"]
49+
args: ["--fix"]
5050
- id: ruff-format
5151

5252
{%- if cookiecutter.backend in ["pybind11", "skbuild", "mesonpy"] %}

{{cookiecutter.project_name}}/pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,7 @@ disallow_incomplete_defs = true
282282

283283

284284
[tool.ruff]
285-
{%- if cookiecutter.backend == "poetry" %}
286-
target-version = "py39"
287-
{%- endif %}
285+
show-fixes = true
288286

289287
[tool.ruff.lint]
290288
extend-select = [

{{cookiecutter.project_name}}/src/{{cookiecutter.__project_slug}}/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
Copyright (c) {{ cookiecutter.__year }} {{ cookiecutter.full_name }}. All rights reserved.
1+
"""Copyright (c) {{ cookiecutter.__year }} {{ cookiecutter.full_name }}. All rights reserved.
32
43
{{ cookiecutter.project_name }}: {{ cookiecutter.project_short_description }}
54
"""

{{cookiecutter.project_name}}/src/{{cookiecutter.__project_slug}}/example.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,31 @@ class Example:
77
def add(self, a: int, b: int) -> int:
88
"""Add two integers.
99
10-
Notes:
10+
Notes
11+
-----
1112
Docstring can be useful. I promise.
1213
13-
Parameters:
14+
Parameters
15+
----------
1416
a: First integer to add.
1517
b: Second integer to add.
1618
17-
Returns:
19+
Returns
20+
-------
1821
The sum of the two integers.
1922
"""
2023
return a + b
2124

2225
def subtract(self, a: int, b: int) -> int:
2326
"""Subtract two integers.
2427
25-
Parameters:
28+
Parameters
29+
----------
2630
a: Integer to subtract from.
2731
b: Integer to subtract.
2832
29-
Returns:
33+
Returns
34+
-------
3035
The difference of the two integers.
3136
"""
3237
return a - b

{{cookiecutter.project_name}}/tests/test_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
import {{ cookiecutter.__project_slug }} as m
66

77

8-
def test_version():
8+
def test_version() -> None:
99
assert importlib.metadata.version("{{ cookiecutter.__project_slug }}") == m.__version__

0 commit comments

Comments
 (0)