Skip to content

Commit d14c1cf

Browse files
effigiesZviBaratz
andcommitted
STY: Run pre-commit config on all files
[git-blame-ignore-rev] Co-authored-by: Zvi Baratz <[email protected]>
1 parent aa0db5f commit d14c1cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+616
-628
lines changed

.git-blame-ignore-revs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ bf298113da99079c9c7b5e1690e41879828cd472
99
# Thu Dec 29 21:32:00 2022 -0500 - [email protected] - STY: isort
1010
0ab2856cac4d4baae7ab3e2f6d58421db55d807f
1111
# Thu Dec 29 21:30:29 2022 -0500 - [email protected] - STY: blue
12-
1a8dd302ff85b1136c81d492509b80e7748339f0
12+
1a8dd302ff85b1136c81d492509b80e7748339f0

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RELEASE_VERSION ?= $(SETUPPY_VERSION)
3838

3939
all: build
4040

41-
build:
41+
build:
4242
$(PYTHON) setup.py config --noisy
4343
$(PYTHON) setup.py build
4444

Makefile.win

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Makefile NiBabel under Windows using a standard Python distribution
22

3-
installer:
3+
installer:
44
# now the installer
55
python setup.py bdist_wininst
66

bin/nib-ls

-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ Output a summary table for neuroimaging files (resolution, dimensionality, etc.)
1313

1414
from nibabel.cmdline.ls import main
1515

16-
1716
if __name__ == '__main__':
1817
main()

bin/nib-nifti-dx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# copyright and license terms.
88
#
99
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
10-
""" Print nifti diagnostics for header files """
10+
"""Print nifti diagnostics for header files"""
1111

1212
from nibabel.cmdline.nifti_dx import main
1313

bin/parrec2nii

-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44

55
from nibabel.cmdline.parrec2nii import main
66

7-
87
if __name__ == '__main__':
98
main()

doc/source/README.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Discover available make targets::
1616
make help
1717

1818
Clean up previous build::
19-
19+
2020
make clean
2121

2222
Build html documentation::

doc/source/_templates/indexsidebar.html

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ <h3>Search mailing list archive</h3>
1919
<input name="userquery" size="18" type="text" /> <input type="submit" value="Go" />
2020
<input name="q" type="hidden" />
2121
</form>
22-

doc/source/conf.py

+62-54
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@
4242
try:
4343
import nibabel
4444
except ImportError:
45-
raise RuntimeError('Need nibabel on Python PATH; consider "make htmldoc" '
46-
'from nibabel root directory')
45+
raise RuntimeError(
46+
'Need nibabel on Python PATH; consider "make htmldoc" from nibabel root directory'
47+
)
4748

4849
# -- General configuration ----------------------------------------------------
4950

@@ -55,23 +56,24 @@
5556
fobj.write(rel['long_description'])
5657

5758
# Load metadata from setup.cfg
58-
with open(Path("../../pyproject.toml"), 'rb') as fobj:
59+
with open(Path('../../pyproject.toml'), 'rb') as fobj:
5960
pyproject = tomllib.load(fobj)
60-
authors = pyproject["project"]["authors"][0]
61+
authors = pyproject['project']['authors'][0]
6162

6263
# Add any Sphinx extension module names here, as strings. They can be
6364
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
64-
extensions = ['sphinx.ext.autodoc',
65-
'sphinx.ext.doctest',
66-
'sphinx.ext.intersphinx',
67-
'sphinx.ext.todo',
68-
'sphinx.ext.mathjax',
69-
'sphinx.ext.inheritance_diagram',
70-
'sphinx.ext.autosummary',
71-
'texext.math_dollar', # has to go before numpydoc
72-
'numpydoc',
73-
'matplotlib.sphinxext.plot_directive',
74-
]
65+
extensions = [
66+
'sphinx.ext.autodoc',
67+
'sphinx.ext.doctest',
68+
'sphinx.ext.intersphinx',
69+
'sphinx.ext.todo',
70+
'sphinx.ext.mathjax',
71+
'sphinx.ext.inheritance_diagram',
72+
'sphinx.ext.autosummary',
73+
'texext.math_dollar', # has to go before numpydoc
74+
'numpydoc',
75+
'matplotlib.sphinxext.plot_directive',
76+
]
7577

7678
# Autosummary always wants to use a `generated/` directory.
7779
# We generate with `make api-stamp`
@@ -85,13 +87,13 @@
8587
source_suffix = '.rst'
8688

8789
# The encoding of source files.
88-
#source_encoding = 'utf-8'
90+
# source_encoding = 'utf-8'
8991

9092
# The master toctree document.
9193
master_doc = 'index'
9294

9395
# General information about the project.
94-
project = u'NiBabel'
96+
project = 'NiBabel'
9597
copyright = f"2006-2022, {authors['name']} <{authors['email']}>"
9698

9799
# The version info for the project you're documenting, acts as replacement for
@@ -105,11 +107,11 @@
105107

106108
# The language for content autogenerated by Sphinx. Refer to documentation
107109
# for a list of supported languages.
108-
#language = None
110+
# language = None
109111

110112
# There are two options for replacing |today|: either, you set today to some
111113
# non-false value, then it is used:
112-
#today = ''
114+
# today = ''
113115
# Else, today_fmt is used as the format for a strftime call.
114116
today_fmt = '%B %d, %Y, %H:%M PDT'
115117

@@ -124,32 +126,32 @@
124126
exclude_trees = ['_build']
125127

126128
# The reST default role (used for this markup: `text`) to use for all documents
127-
#default_role = None
129+
# default_role = None
128130

129131
# If true, '()' will be appended to :func: etc. cross-reference text.
130-
#add_function_parentheses = True
132+
# add_function_parentheses = True
131133

132134
# If true, the current module name will be prepended to all description
133135
# unit titles (such as .. function::).
134-
#add_module_names = True
136+
# add_module_names = True
135137

136138
# If true, sectionauthor and moduleauthor directives will be shown in the
137139
# output. They are ignored by default.
138-
#show_authors = False
140+
# show_authors = False
139141

140142
# The name of the Pygments (syntax highlighting) style to use.
141143
pygments_style = 'sphinx'
142144

143145
# A list of ignored prefixes for module index sorting.
144-
#modindex_common_prefix = []
146+
# modindex_common_prefix = []
145147

146148
# -- Sphinxext configuration --------------------------------------------------
147149

148150
# Set attributes for layout of inheritance diagrams
149-
inheritance_graph_attrs = dict(rankdir="LR", size='"6.0, 8.0"', fontsize=14,
150-
ratio='compress')
151-
inheritance_node_attrs = dict(shape='ellipse', fontsize=14, height=0.75,
152-
color='dodgerblue1', style='filled')
151+
inheritance_graph_attrs = dict(rankdir='LR', size='"6.0, 8.0"', fontsize=14, ratio='compress')
152+
inheritance_node_attrs = dict(
153+
shape='ellipse', fontsize=14, height=0.75, color='dodgerblue1', style='filled'
154+
)
153155

154156
# Flag to show todo items in rendered output
155157
todo_include_todos = True
@@ -168,26 +170,26 @@
168170
# Theme options are theme-specific and customize the look and feel of a theme
169171
# further. For a list of options available for each theme, see the
170172
# documentation.
171-
#html_theme_options = {}
173+
# html_theme_options = {}
172174

173175
# Add any paths that contain custom themes here, relative to this directory.
174-
#html_theme_path = []
176+
# html_theme_path = []
175177

176178
# The name for this set of Sphinx documents. If None, it defaults to
177179
# "<project> v<release> documentation".
178-
#html_title = ''
180+
# html_title = ''
179181

180182
# A shorter title for the navigation bar. Default is the same as html_title.
181-
#html_short_title = None
183+
# html_short_title = None
182184

183185
# The name of an image file (relative to this directory) to place at the top
184186
# of the sidebar.
185-
#html_logo = None
187+
# html_logo = None
186188

187189
# The name of an image file (within the static path) to use as favicon of the
188190
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
189191
# pixels large.
190-
#html_favicon = None
192+
# html_favicon = None
191193

192194
# Add any paths that contain custom static files (such as style sheets) here,
193195
# relative to this directory. They are copied after the builtin static files,
@@ -196,42 +198,50 @@
196198

197199
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
198200
# using the given strftime format.
199-
#html_last_updated_fmt = '%b %d, %Y'
201+
# html_last_updated_fmt = '%b %d, %Y'
200202

201203
# Content template for the index page.
202204
html_index = 'index.html'
203205

204206
# If true, SmartyPants will be used to convert quotes and dashes to
205207
# typographically correct entities.
206-
#html_use_smartypants = True
208+
# html_use_smartypants = True
207209

208210
# Custom sidebar templates, maps document names to template names.
209-
html_sidebars = {'index': ['localtoc.html', 'relations.html', 'sourcelink.html',
210-
'indexsidebar.html', 'searchbox.html', 'reggie.html']}
211+
html_sidebars = {
212+
'index': [
213+
'localtoc.html',
214+
'relations.html',
215+
'sourcelink.html',
216+
'indexsidebar.html',
217+
'searchbox.html',
218+
'reggie.html',
219+
]
220+
}
211221

212222
# Additional templates that should be rendered to pages, maps page names to
213223
# template names.
214-
#html_additional_pages = {'index': 'index.html'}
224+
# html_additional_pages = {'index': 'index.html'}
215225

216226
# If false, no module index is generated.
217-
#html_use_modindex = True
227+
# html_use_modindex = True
218228

219229
# If false, no index is generated.
220-
#html_use_index = True
230+
# html_use_index = True
221231

222232
# If true, the index is split into individual pages for each letter.
223-
#html_split_index = False
233+
# html_split_index = False
224234

225235
# If true, links to the reST sources are added to the pages.
226236
html_show_sourcelink = True
227237

228238
# If true, an OpenSearch description file will be output, and all pages will
229239
# contain a <link> tag referring to it. The value of this option must be the
230240
# base URL from which the finished HTML is served.
231-
#html_use_opensearch = ''
241+
# html_use_opensearch = ''
232242

233243
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
234-
#html_file_suffix = ''
244+
# html_file_suffix = ''
235245

236246
# Output file base name for HTML help builder.
237247
htmlhelp_basename = 'nibabeldoc'
@@ -241,34 +251,32 @@
241251
# -- Options for LaTeX output -------------------------------------------------
242252

243253
# The paper size ('letter' or 'a4').
244-
#latex_paper_size = 'letter'
254+
# latex_paper_size = 'letter'
245255

246256
# The font size ('10pt', '11pt' or '12pt').
247-
#latex_font_size = '10pt'
257+
# latex_font_size = '10pt'
248258

249259
# Grouping the document tree into LaTeX files. List of tuples
250260
# (source start file, target name, title, author,
251261
# documentclass [howto/manual]).
252-
latex_documents = [
253-
('index', 'nibabel.tex', u'NiBabel Documentation', u'NiBabel Authors',
254-
'manual')]
262+
latex_documents = [('index', 'nibabel.tex', 'NiBabel Documentation', 'NiBabel Authors', 'manual')]
255263

256264
# The name of an image file (relative to this directory) to place at the top of
257265
# the title page.
258-
#latex_logo = None
266+
# latex_logo = None
259267

260268
# For "manual" documents, if this is true, then toplevel headings are parts,
261269
# not chapters.
262-
#latex_use_parts = False
270+
# latex_use_parts = False
263271

264272
# Additional stuff for the LaTeX preamble.
265-
#latex_preamble = ''
273+
# latex_preamble = ''
266274

267275
# Documents to append as an appendix to all manuals.
268-
#latex_appendices = []
276+
# latex_appendices = []
269277

270278
# If false, no module index is generated.
271-
#latex_use_modindex = True
279+
# latex_use_modindex = True
272280

273281

274282
# Example configuration for intersphinx: refer to the Python standard library.

doc/source/devel/biaps/biap_0001.rst

-1
Original file line numberDiff line numberDiff line change
@@ -297,4 +297,3 @@ How about the names in the proposal? ``is_proxy``; ``unproxy=True``?
297297

298298

299299
.. vim: ft=rst
300-

doc/source/devel/biaps/biap_0003.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ From `adding nifti extensions`_:
4141
* 4 = NIFTI_ECODE_AFNI = AFNI header attributes: The format of the AFNI
4242
extension in the NIfTI-1.1 format is described at
4343
http://nifti.nimh.nih.gov/nifti-1/AFNIextension1/
44-
* 6 = NIFTI_ECODE_COMMENT = comment: arbitrary non-NUL ASCII text, with no
44+
* 6 = NIFTI_ECODE_COMMENT = comment: arbitrary non-NUL ASCII text, with no
4545
additional structure implied
4646
* 8 = NIFTI_ECODE_XCEDE = XCEDE metadata:
4747
http://www.nbirn.net/Resources/Users/Applications/xcede/index.htm
@@ -369,7 +369,7 @@ apply to the Cartesian product of the image axis values. For example, if the
369369
values of ``applies_to`` == ``['slice', 'time']``, and the slice and time axes
370370
in the array are lengths (6, 10) respectively, then the values apply to all
371371
combinations of the 6 possible values for slice indices and the 10 possible
372-
values for the time indices (ie apply to all 6x10=60 values). The axis metadata
372+
values for the time indices (ie apply to all 6x10=60 values). The axis metadata
373373
values in this case can be:
374374

375375
* a scalar. The value applies to every combination of (slice, time)

0 commit comments

Comments
 (0)