Skip to content

Commit db48ab2

Browse files
author
Beat Buesser
committed
Apply Black format
Signed-off-by: Beat Buesser <[email protected]>
1 parent d17a063 commit db48ab2

File tree

3 files changed

+46
-32
lines changed

3 files changed

+46
-32
lines changed

conftest.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ def _image_data_generator(**kwargs):
253253
data_generator = None
254254
if framework == "keras" or framework == "kerastf":
255255
data_generator = KerasDataGenerator(
256-
iterator=image_it, size=x_train_mnist.shape[0], batch_size=default_batch_size,
256+
iterator=image_it,
257+
size=x_train_mnist.shape[0],
258+
batch_size=default_batch_size,
257259
)
258260

259261
if framework == "tensorflow1":
@@ -374,10 +376,17 @@ def __init__(self, **kwargs):
374376
super(Model, self).__init__(**kwargs)
375377
self.model = mxnet.gluon.nn.Sequential()
376378
self.model.add(
377-
mxnet.gluon.nn.Conv2D(channels=1, kernel_size=7, activation="relu",),
379+
mxnet.gluon.nn.Conv2D(
380+
channels=1,
381+
kernel_size=7,
382+
activation="relu",
383+
),
378384
mxnet.gluon.nn.MaxPool2D(pool_size=4, strides=4),
379385
mxnet.gluon.nn.Flatten(),
380-
mxnet.gluon.nn.Dense(10, activation=None,),
386+
mxnet.gluon.nn.Dense(
387+
10,
388+
activation=None,
389+
),
381390
)
382391

383392
def forward(self, x):

docs/conf.py

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,21 @@
1313
# documentation root, use os.path.abspath to make it absolute, like shown here.
1414
import os
1515
import sys
16-
sys.path.insert(0, os.path.abspath('..'))
16+
17+
sys.path.insert(0, os.path.abspath(".."))
1718

1819
# import art
1920

2021
# -- Project information -----------------------------------------------------
2122

22-
project = 'Adversarial Robustness Toolbox'
23-
copyright = '2018, The Adversarial Robustness Toolbox (ART) Authors'
24-
author = 'Maria-Irina Nicolae'
23+
project = "Adversarial Robustness Toolbox"
24+
copyright = "2018, The Adversarial Robustness Toolbox (ART) Authors"
25+
author = "Maria-Irina Nicolae"
2526

2627
# The short X.Y version
27-
version = '1.7'
28+
version = "1.7"
2829
# The full version, including alpha/beta/rc tags
29-
release = '1.7.0-dev'
30+
release = "1.7.0-dev"
3031

3132

3233
# -- General configuration ---------------------------------------------------
@@ -38,22 +39,19 @@
3839
# Add any Sphinx extension module names here, as strings. They can be
3940
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4041
# ones.
41-
extensions = [
42-
'sphinx.ext.viewcode',
43-
'sphinx.ext.autodoc'
44-
]
42+
extensions = ["sphinx.ext.viewcode", "sphinx.ext.autodoc"]
4543

4644
# Add any paths that contain templates here, relative to this directory.
47-
templates_path = ['_templates']
45+
templates_path = ["_templates"]
4846

4947
# The suffix(es) of source filenames.
5048
# You can specify multiple suffix as a list of string:
5149
#
5250
# source_suffix = ['.rst', '.md']
53-
source_suffix = '.rst'
51+
source_suffix = ".rst"
5452

5553
# The master toctree document.
56-
master_doc = 'index'
54+
master_doc = "index"
5755

5856
# The language for content autogenerated by Sphinx. Refer to documentation
5957
# for a list of supported languages.
@@ -65,10 +63,10 @@
6563
# List of patterns, relative to source directory, that match files and
6664
# directories to ignore when looking for source files.
6765
# This pattern also affects html_static_path and html_extra_path .
68-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
66+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
6967

7068
# The name of the Pygments (syntax highlighting) style to use.
71-
pygments_style = 'sphinx'
69+
pygments_style = "sphinx"
7270

7371

7472
# -- Options for HTML output -------------------------------------------------
@@ -78,14 +76,14 @@
7876
#
7977
# html_theme = 'alabaster'
8078

81-
if os.environ.get('READTHEDOCS') != 'True':
79+
if os.environ.get("READTHEDOCS") != "True":
8280
try:
8381
import sphinx_rtd_theme
8482
except ImportError:
8583
pass # assume we have sphinx >= 1.3
8684
else:
8785
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
88-
html_theme = 'sphinx_rtd_theme'
86+
html_theme = "sphinx_rtd_theme"
8987

9088
# Theme options are theme-specific and customize the look and feel of a theme
9189
# further. For a list of options available for each theme, see the
@@ -112,7 +110,7 @@
112110
# -- Options for HTMLHelp output ---------------------------------------------
113111

114112
# Output file base name for HTML help builder.
115-
htmlhelp_basename = 'adversarial-robustness-toolboxdoc'
113+
htmlhelp_basename = "adversarial-robustness-toolboxdoc"
116114

117115

118116
# -- Options for LaTeX output ------------------------------------------------
@@ -121,15 +119,12 @@
121119
# The paper size ('letterpaper' or 'a4paper').
122120
#
123121
# 'papersize': 'letterpaper',
124-
125122
# The font size ('10pt', '11pt' or '12pt').
126123
#
127124
# 'pointsize': '10pt',
128-
129125
# Additional stuff for the LaTeX preamble.
130126
#
131127
# 'preamble': '',
132-
133128
# Latex figure (float) alignment
134129
#
135130
# 'figure_align': 'htbp',
@@ -139,8 +134,13 @@
139134
# (source start file, target name, title,
140135
# author, documentclass [howto, manual, or own class]).
141136
latex_documents = [
142-
(master_doc, 'adversarial-robustness-toolbox.tex', 'adversarial-robustness-toolbox Documentation',
143-
'Maria-Irina Nicolae', 'manual'),
137+
(
138+
master_doc,
139+
"adversarial-robustness-toolbox.tex",
140+
"adversarial-robustness-toolbox Documentation",
141+
"Maria-Irina Nicolae",
142+
"manual",
143+
),
144144
]
145145

146146

@@ -149,8 +149,7 @@
149149
# One entry per manual page. List of tuples
150150
# (source start file, name, description, authors, manual section).
151151
man_pages = [
152-
(master_doc, 'adversarial-robustness-toolbox', 'adversarial-robustness-toolbox Documentation',
153-
[author], 1)
152+
(master_doc, "adversarial-robustness-toolbox", "adversarial-robustness-toolbox Documentation", [author], 1)
154153
]
155154

156155

@@ -160,9 +159,15 @@
160159
# (source start file, target name, title, author,
161160
# dir menu entry, description, category)
162161
texinfo_documents = [
163-
(master_doc, 'adversarial-robustness-toolbox', 'adversarial-robustness-toolbox Documentation',
164-
author, 'adversarial-robustness-toolbox', 'One line description of project.',
165-
'Miscellaneous'),
162+
(
163+
master_doc,
164+
"adversarial-robustness-toolbox",
165+
"adversarial-robustness-toolbox Documentation",
166+
author,
167+
"adversarial-robustness-toolbox",
168+
"One line description of project.",
169+
"Miscellaneous",
170+
),
166171
]
167172

168173

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"six",
1414
"setuptools",
1515
"tqdm",
16-
"numba~=0.53.1"
16+
"numba~=0.53.1",
1717
]
1818

1919
docs_require = [

0 commit comments

Comments
 (0)