Skip to content

Commit 5c3b769

Browse files
authored
Merge pull request #124 from templateflow/sty/ruff-wider
MAINT: Revise code style according to ruff
2 parents b9cfc2c + aa9a1bb commit 5c3b769

File tree

9 files changed

+78
-676
lines changed

9 files changed

+78
-676
lines changed

docs/conf.py

Lines changed: 64 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
1212
#
1313
from packaging.version import Version
14-
from templateflow import __version__, __copyright__, __packagename__
14+
15+
from templateflow import __copyright__, __packagename__, __version__
1516

1617
# -- Project information -----------------------------------------------------
1718
project = __packagename__
1819
copyright = __copyright__
19-
author = "The NiPreps Developers"
20+
author = 'The NiPreps Developers'
2021

2122
# The full version, including alpha/beta/rc tags
2223
release = __version__
@@ -29,31 +30,31 @@
2930

3031
# -- General configuration ---------------------------------------------------
3132
extensions = [
32-
"sphinx.ext.autodoc",
33-
"sphinx.ext.coverage",
34-
"sphinx.ext.doctest",
35-
"sphinx.ext.githubpages",
36-
"sphinx.ext.ifconfig",
37-
"sphinx.ext.intersphinx",
38-
"sphinx.ext.mathjax",
39-
"sphinx.ext.napoleon",
40-
"sphinx.ext.viewcode",
41-
"sphinxcontrib.apidoc",
42-
"nbsphinx",
43-
"sphinx_click",
33+
'sphinx.ext.autodoc',
34+
'sphinx.ext.coverage',
35+
'sphinx.ext.doctest',
36+
'sphinx.ext.githubpages',
37+
'sphinx.ext.ifconfig',
38+
'sphinx.ext.intersphinx',
39+
'sphinx.ext.mathjax',
40+
'sphinx.ext.napoleon',
41+
'sphinx.ext.viewcode',
42+
'sphinxcontrib.apidoc',
43+
'nbsphinx',
44+
'sphinx_click',
4445
]
4546

4647
autodoc_mock_imports = [
47-
"matplotlib",
48-
"nilearn",
49-
"nipy",
50-
"nitime",
51-
"numpy",
52-
"pandas",
53-
"seaborn",
54-
"skimage",
55-
"svgutils",
56-
"transforms3d",
48+
'matplotlib',
49+
'nilearn',
50+
'nipy',
51+
'nitime',
52+
'numpy',
53+
'pandas',
54+
'seaborn',
55+
'skimage',
56+
'svgutils',
57+
'transforms3d',
5758
]
5859
autodoc_autoreload = True
5960

@@ -68,16 +69,16 @@
6869
# ]
6970

7071
# Add any paths that contain templates here, relative to this directory.
71-
templates_path = ["_templates"]
72+
templates_path = ['_templates']
7273

7374
# The suffix(es) of source filenames.
7475
# You can specify multiple suffix as a list of string:
7576
#
7677
# source_suffix = ['.rst', '.md']
77-
source_suffix = ".rst"
78+
source_suffix = '.rst'
7879

7980
# The master toctree document.
80-
master_doc = "index"
81+
master_doc = 'index'
8182

8283
# The language for content autogenerated by Sphinx. Refer to documentation
8384
# for a list of supported languages.
@@ -90,11 +91,11 @@
9091
# directories to ignore when looking for source files.
9192
# This pattern also affects html_static_path and html_extra_path.
9293
exclude_patterns = [
93-
"_build",
94-
"Thumbs.db",
95-
".DS_Store",
96-
"api/modules.rst",
97-
"api/templateflow.rst",
94+
'_build',
95+
'Thumbs.db',
96+
'.DS_Store',
97+
'api/modules.rst',
98+
'api/templateflow.rst',
9899
]
99100

100101
# The name of the Pygments (syntax highlighting) style to use.
@@ -106,7 +107,7 @@
106107
# The theme to use for HTML and HTML Help pages. See the documentation for
107108
# a list of builtin themes.
108109
#
109-
html_theme = "sphinx_rtd_theme"
110+
html_theme = 'sphinx_rtd_theme'
110111

111112
# Theme options are theme-specific and customize the look and feel of a theme
112113
# further. For a list of options available for each theme, see the
@@ -117,7 +118,7 @@
117118
# Add any paths that contain custom static files (such as style sheets) here,
118119
# relative to this directory. They are copied after the builtin static files,
119120
# so a file named "default.css" will overwrite the builtin "default.css".
120-
html_static_path = ["_static"]
121+
html_static_path = ['_static']
121122

122123
# Custom sidebar templates, must be a dictionary that maps document names
123124
# to template names.
@@ -133,7 +134,7 @@
133134
# -- Options for HTMLHelp output ---------------------------------------------
134135

135136
# Output file base name for HTML help builder.
136-
htmlhelp_basename = "templateflowdoc"
137+
htmlhelp_basename = 'templateflowdoc'
137138

138139

139140
# -- Options for LaTeX output ------------------------------------------------
@@ -159,10 +160,10 @@
159160
latex_documents = [
160161
(
161162
master_doc,
162-
"templateflow.tex",
163-
"TemplateFlow Documentation",
164-
"The TemplateFlow Developers",
165-
"manual",
163+
'templateflow.tex',
164+
'TemplateFlow Documentation',
165+
'The TemplateFlow Developers',
166+
'manual',
166167
),
167168
]
168169

@@ -171,7 +172,7 @@
171172

172173
# One entry per manual page. List of tuples
173174
# (source start file, name, description, authors, manual section).
174-
man_pages = [(master_doc, "templateflow", "TemplateFlow Documentation", [author], 1)]
175+
man_pages = [(master_doc, 'templateflow', 'TemplateFlow Documentation', [author], 1)]
175176

176177

177178
# -- Options for Texinfo output ----------------------------------------------
@@ -182,12 +183,12 @@
182183
texinfo_documents = [
183184
(
184185
master_doc,
185-
"templateflow",
186-
"TemplateFlow Documentation",
186+
'templateflow',
187+
'TemplateFlow Documentation',
187188
author,
188-
"TemplateFlow",
189-
"One line description of project.",
190-
"Miscellaneous",
189+
'TemplateFlow',
190+
'One line description of project.',
191+
'Miscellaneous',
191192
),
192193
]
193194

@@ -207,38 +208,38 @@
207208
# epub_uid = ''
208209

209210
# A list of files that should not be packed into the epub file.
210-
epub_exclude_files = ["search.html"]
211+
epub_exclude_files = ['search.html']
211212

212213

213214
# -- Extension configuration -------------------------------------------------
214215

215-
apidoc_module_dir = "../templateflow"
216-
apidoc_output_dir = "api"
216+
apidoc_module_dir = '../templateflow'
217+
apidoc_output_dir = 'api'
217218
apidoc_excluded_paths = [
218-
"conftest.py",
219-
"*/tests/*",
220-
"tests/*",
221-
"data/*",
219+
'conftest.py',
220+
'*/tests/*',
221+
'tests/*',
222+
'data/*',
222223
]
223224
apidoc_separate_modules = True
224-
apidoc_extra_args = ["--module-first", "-d 1", "-T"]
225+
apidoc_extra_args = ['--module-first', '-d 1', '-T']
225226

226227
# -- Options for intersphinx extension ---------------------------------------
227228

228229
# Example configuration for intersphinx: refer to the Python standard library.
229230
intersphinx_mapping = {
230-
"bids": ("https://bids-standard.github.io/pybids/", None),
231-
"matplotlib": ("https://matplotlib.org/", None),
232-
"nibabel": ("https://nipy.org/nibabel/", None),
233-
"nipype": ("https://nipype.readthedocs.io/en/latest/", None),
234-
"numpy": ("https://numpy.org/doc/stable/", None),
235-
"pandas": ("http://pandas.pydata.org/pandas-docs/dev", None),
236-
"python": ("https://docs.python.org/3/", None),
237-
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
231+
'bids': ('https://bids-standard.github.io/pybids/', None),
232+
'matplotlib': ('https://matplotlib.org/', None),
233+
'nibabel': ('https://nipy.org/nibabel/', None),
234+
'nipype': ('https://nipype.readthedocs.io/en/latest/', None),
235+
'numpy': ('https://numpy.org/doc/stable/', None),
236+
'pandas': ('http://pandas.pydata.org/pandas-docs/dev', None),
237+
'python': ('https://docs.python.org/3/', None),
238+
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
238239
}
239240

240241
# -- Options for versioning extension ----------------------------------------
241-
smv_branch_whitelist = r"^master$"
242-
smv_tag_whitelist = r"^\d+\.\d+\.\d+(?!rc|dev).*$"
242+
smv_branch_whitelist = r'^master$'
243+
smv_tag_whitelist = r'^\d+\.\d+\.\d+(?!rc|dev).*$'
243244
smv_released_pattern = r'^tags/.*$'
244245
smv_rebuild_tags = False

docs/tools/LICENSE.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)