Skip to content

Commit 0c2dffd

Browse files
committed
DOC: Homogenized module-level docstring formatting
1 parent 3f1c6f9 commit 0c2dffd

21 files changed

+28
-47
lines changed

nibabel/affines.py

Lines changed: 2 additions & 3 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
@@ -313,7 +312,7 @@ def voxel_sizes(affine):
313312

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

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/environment.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-
Settings from the system environment relevant to NIPY
5-
"""
3+
"""Settings from the system environment relevant to NIPY"""
64

75
import os
86
from os.path import join as pjoin

nibabel/filebasedimages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# copyright and license terms.
77
#
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9-
"""Common interface for any image format--volume or surface, binary or xml."""
9+
"""Common interface for any image format--volume or surface, binary or xml"""
1010
from __future__ import annotations
1111

1212
import io

nibabel/fileslice.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Utilities for getting array slices out of file-like objects
2-
"""
1+
"""Utilities for getting array slices out of file-like objects"""
32

43
import operator
54
from functools import reduce

nibabel/fileutils.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-
"""Utilities for reading and writing to binary file formats
10-
"""
9+
"""Utilities for reading and writing to binary file formats"""
1110

1211

1312
def read_zt_byte_strings(fobj, n_strings=1, bufsize=1024):

nibabel/imagestats.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
# copyright and license terms.
77
#
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9-
"""
10-
Functions for computing image statistics
11-
"""
9+
"""Functions for computing image statistics"""
1210

1311
import numpy as np
1412

nibabel/mriutils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
# copyright and license terms.
77
#
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9-
"""
10-
Utilities for calculations related to MRI
11-
"""
9+
"""Utilities for calculations related to MRI"""
1210

1311
__all__ = ['calculate_dwell_time']
1412

nibabel/onetime.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""
2-
Descriptor support for NIPY.
1+
"""Descriptor support for NIPY
32
43
Utilities to support special Python descriptors [1,2], in particular the use of
54
a useful pattern for properties we call 'one time properties'. These are

nibabel/openers.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-
"""Context manager openers for various fileobject types
10-
"""
9+
"""Context manager openers for various fileobject types"""
1110

1211
import gzip
1312
import warnings

nibabel/parrec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
99
# Disable line length checking for PAR fragments in module docstring
1010
# flake8: noqa E501
11-
"""Read images in PAR/REC format.
11+
"""Read images in PAR/REC format
1212
1313
This is yet another MRI image format generated by Philips scanners. It is an
1414
ASCII header (PAR) plus a binary blob (REC).

nibabel/processing.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
# copyright and license terms.
77
#
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9-
"""Image processing functions for:
9+
"""Image processing functions
1010
11-
* smoothing
12-
* resampling
13-
* converting sd to and from FWHM
11+
Image processing functions for:
1412
15-
Smoothing and resampling routines need scipy
13+
* smoothing
14+
* resampling
15+
* converting SD to and from FWHM
16+
17+
Smoothing and resampling routines need scipy.
1618
"""
1719

1820
import numpy as np

nibabel/quaternions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
99
"""
10-
Functions to operate on, or return, quaternions.
10+
Functions to operate on, or return, quaternions
1111
1212
The module also includes functions for the closely related angle, axis
1313
pair as a specification for rotation.

nibabel/tmpdirs.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-
"""Contexts for *with* statement providing temporary directories
10-
"""
9+
"""Contexts for *with* statement providing temporary directories"""
1110
import os
1211
import tempfile
1312
from contextlib import contextmanager

nibabel/tripwire.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Class to raise error for missing modules or other misfortunes
2-
"""
1+
"""Class to raise error for missing modules or other misfortunes"""
32
from typing import Any
43

54

nibabel/viewers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
class OrthoSlicer3D:
17-
"""Orthogonal-plane slice viewer.
17+
"""Orthogonal-plane slice viewer
1818
1919
OrthoSlicer3d expects 3- or 4-dimensional array data. It treats
2020
4D data as a sequence of 3D spatial volumes, where a slice over the final

nibabel/xmlutils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
# copyright and license terms.
77
#
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9-
"""
10-
Thin layer around xml.etree.ElementTree, to abstract nibabel xml support.
11-
"""
9+
"""Thin layer around xml.etree.ElementTree, to abstract nibabel xml support"""
1210

1311
from io import BytesIO
1412
from xml.etree.ElementTree import Element, SubElement, tostring # noqa

0 commit comments

Comments
 (0)