Skip to content

Commit cbd7690

Browse files
authored
Merge pull request #1200 from ZviBaratz/doc/docstrings
DOC: Standardize module-level docstrings format
2 parents 3f1c6f9 + 7903364 commit cbd7690

33 files changed

+29
-71
lines changed

nibabel/affines.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
3-
"""Utility routines for working with points and affine transforms
4-
"""
3+
"""Utility routines for working with points and affine transforms"""
54
from functools import reduce
65

76
import numpy as np
@@ -100,7 +99,7 @@ def apply_affine(aff, pts, inplace=False):
10099

101100

102101
def to_matvec(transform):
103-
"""Split a transform into its matrix and vector components.
102+
"""Split a transform into its matrix and vector components
104103
105104
The transformation must be represented in homogeneous coordinates and is
106105
split into its rotation matrix and translation vector components.
@@ -312,8 +311,7 @@ def voxel_sizes(affine):
312311

313312

314313
def obliquity(affine):
315-
r"""
316-
Estimate the *obliquity* an affine's axes represent.
314+
r"""Estimate the *obliquity* an affine's axes represent
317315
318316
The term *obliquity* is defined here as the rotation of those axes with
319317
respect to the cardinal axes.

nibabel/arraywriters.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def __init__(self, array, out_dtype=None)
2828
something else to make sense of conversions between float and int, or between
2929
larger ints and smaller.
3030
"""
31-
3231
import numpy as np
3332

3433
from .casting import (

nibabel/brikhead.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
# copyright and license terms.
77
#
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9-
"""
10-
Class for reading AFNI BRIK/HEAD datasets
9+
"""Class for reading AFNI BRIK/HEAD datasets
1110
1211
See https://afni.nimh.nih.gov/pub/dist/doc/program_help/README.attributes.html
1312
for information on what is required to have a valid BRIK/HEAD dataset.

nibabel/data.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
3-
"""
4-
Utilities to find files from NIPY data packages
5-
"""
3+
"""Utilities to find files from NIPY data packages"""
64
import configparser
75
import glob
86
import os

nibabel/deprecated.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Module to help with deprecating objects and classes
2-
"""
1+
"""Module to help with deprecating objects and classes"""
32
from __future__ import annotations
43

54
import typing as ty

nibabel/deprecator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Class for recording and reporting deprecations
2-
"""
1+
"""Class for recording and reporting deprecations"""
32
from __future__ import annotations
43

54
import functools

nibabel/dft.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
#
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
99
# Copyright (C) 2011 Christian Haselgrove
10-
"""DICOM filesystem tools
11-
"""
10+
"""DICOM filesystem tools"""
1211

1312

1413
import contextlib

nibabel/ecat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
GPL and some of the header files are adapted from CTI files (called CTI code
4343
below). It's not clear what the licenses are for these files.
4444
"""
45-
4645
import warnings
4746
from numbers import Integral
4847

nibabel/environment.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
3-
"""
4-
Settings from the system environment relevant to NIPY
5-
"""
6-
3+
"""Settings from the system environment relevant to NIPY"""
74
import os
85
from os.path import join as pjoin
96

nibabel/eulerangles.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
``y``, followed by rotation around ``x``, is known (confusingly) as
8383
"xyz", pitch-roll-yaw, Cardan angles, or Tait-Bryan angles.
8484
"""
85-
8685
import math
8786
from functools import reduce
8887

0 commit comments

Comments
 (0)