Skip to content

Commit fb73a5b

Browse files
authored
format doc strings as Google style (#1183)
1 parent 2e66155 commit fb73a5b

File tree

6 files changed

+97
-82
lines changed

6 files changed

+97
-82
lines changed

docs/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ plugins:
172172
python:
173173
options:
174174
show_source: false
175-
docstring_style: null
175+
docstring_style: google
176176
docstring_section_style: list
177177
heading_level: 1
178178
inherited_members: true

docs/src/webknossos-py/examples/dataset_usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The [`Dataset` class](../../api/webknossos/dataset/dataset.md) is the entry-poin
77
The dataset stores the data on disk in `.wkw`-files.
88

99
Each dataset consists of one or more [layers](../../api/webknossos/dataset/layer.md),
10-
which themselves can comprise multiple [magnifications represented via `MagView`s](../../api/webknossos/dataset/magview.md).
10+
which themselves can comprise multiple [magnifications represented via `MagView`s](../../api/webknossos/dataset/mag_view.md).
1111

1212
```python
1313
--8<--

docs/src/webknossos-py/examples/download_image_data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Download Image Data
22

3-
Downloads part of a [webknossos dataset](https://webknossos.org/datasets/scalable_minds/l4dense_motta_et_al_demo/view) from [webknossos.org](https://webknossos.org) using [`webknossos_context`](../../api/webknossos/client/webknossos_context.md#webknossos.client.context.webknossos_context).
3+
Downloads part of a [webknossos dataset](https://webknossos.org/datasets/scalable_minds/l4dense_motta_et_al_demo/view) from [webknossos.org](https://webknossos.org) using [`webknossos_context`](../../api/webknossos/client/context.md#webknossos.client.context.webknossos_context).
44

55
```python
66
--8<--

webknossos/webknossos/geometry/bounding_box.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,12 @@ def in_mag(self, mag: Mag) -> "BoundingBox":
224224
def _align_with_mag_slow(self, mag: Mag, ceil: bool = False) -> "BoundingBox":
225225
"""Rounds the bounding box, so that both topleft and bottomright are divisible by mag.
226226
227-
:argument ceil: If true, the bounding box is enlarged when necessary. If false, it's shrunk when necessary.
227+
Args:
228+
mag (Mag): The mag to align with.
229+
ceil (bool): If true, the bounding box is enlarged when necessary. If false, it's shrunk when necessary.
230+
231+
Returns:
232+
BoundingBox: The aligned bounding box.
228233
"""
229234
np_mag = mag.to_np()
230235

@@ -244,7 +249,12 @@ def align_with_mag(
244249
) -> "BoundingBox":
245250
"""Rounds the bounding box, so that both topleft and bottomright are divisible by mag.
246251
247-
:argument ceil: If true, the bounding box is enlarged when necessary. If false, it's shrunk when necessary.
252+
Args:
253+
mag (Mag): The mag to align with.
254+
ceil (bool): If true, the bounding box is enlarged when necessary. If false, it's shrunk when necessary.
255+
256+
Returns:
257+
BoundingBox: The aligned bounding box.
248258
"""
249259
# This does the same as _align_with_mag_slow, which is more readable.
250260
# Same behavior is asserted in test_align_with_mag_against_numpy_implementation

0 commit comments

Comments
 (0)