Skip to content

Commit 27f8586

Browse files
sneakers-the-ratlwasser
authored andcommitted
fix template init test, make example module actually pass the linting rules lol
1 parent f2f1e4d commit 27f8586

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

template/pyproject.toml.jinja

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,11 @@ lines-after-imports = 1
177177

178178
[tool.pydoclint]
179179
style = "numpy"
180+
{%- if use_types %}
181+
arg-type-hints-in-signature = true
182+
{%- else %}
180183
arg-type-hints-in-signature = false
184+
{%- endif %}
181185
arg-type-hints-in-docstring = true
182186
check-return-types = false
183187
check-yield-types = false
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{% include pathjoin("includes", "licenses", "header.txt.jinja") %}
22

3-
"""Add a docstring here for the init module. This might include a very
4-
brief description of the package, its purpose, and any important notes."""
3+
"""
4+
Add a docstring here for the init module.
5+
6+
This might include a very brief description of the package,
7+
its purpose, and any important notes.
8+
"""
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
"""
2-
A module that adds numbers together. You may want to delete this module or
3-
modify it for your package. It's generally good practice to have a docstring
2+
A module that adds numbers together.
3+
4+
You may want to delete this module or modify it for your package.
5+
It's generally good practice to have a docstring
46
that explains the purpose of the module, at the top.
57
"""
68

7-
def add_numbers(a, b):
9+
def add_numbers(a: float, b: float) -> float:
810
"""
911
Add two numbers together and return the result.
12+
1013
This is an example function with a numpy style docstring.
1114
We recommend using this style for consistency and readability.
1215

1316
Parameters
1417
----------
15-
a : int or float
18+
a : float
1619
The first number to add.
17-
b : int or float
20+
b : float
1821
The second number to add.
1922

2023
Returns
2124
-------
22-
int
25+
float
2326
The sum of the two numbers.
24-
"""
2527

28+
"""
2629
return a + b

0 commit comments

Comments
 (0)