Skip to content

Commit af37c38

Browse files
committed
fix indent of docstring with summary line
1 parent 794c416 commit af37c38

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

template/utils/_checks.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
import numpy as np
1010

11+
from ._docs import fill_doc
12+
1113

1214
def _ensure_int(item: Any, item_name: Optional[str] = None) -> int:
1315
"""Ensure a variable is an integer.
@@ -177,13 +179,13 @@ def _check_value(
177179
return item
178180

179181

182+
@fill_doc
180183
def _check_verbose(verbose: Union[bool, str, int, None]) -> int:
181184
"""Check that the value of verbose is valid.
182185
183186
Parameters
184187
----------
185-
verbose : bool | str | int | None
186-
The verbosity level.
188+
%(verbose)s
187189
188190
Returns
189191
-------

template/utils/_docs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def _indentcount_lines(lines: List[str]) -> int:
8484
0
8585
"""
8686
indent = sys.maxsize
87-
for line in lines:
87+
for k, line in enumerate(lines):
88+
if k == 0:
89+
continue
8890
line_stripped = line.lstrip()
8991
if line_stripped:
9092
indent = min(indent, len(line) - len(line_stripped))

0 commit comments

Comments
 (0)