Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit ed1c067

Browse files
committed
Update: black
1 parent 8972d67 commit ed1c067

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

runestone/datafile/__init__.py

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
RunestoneIdDirective,
2828
RunestoneIdNode,
2929
)
30+
import pdb
3031

3132

3233
def setup(app):
@@ -38,7 +39,7 @@ def setup(app):
3839
app.connect("env-purge-doc", purge_datafiles)
3940

4041

41-
TEMPLATE = u"""
42+
TEMPLATE = """
4243
<div class="runestone datafile %(optclass)s">
4344
<div class="datafile_caption">Data file: <code>%(divid)s</code></div>
4445
<pre data-component="datafile" id=%(divid)s %(hidden)s data-edit="%(edit)s" data-rows="%(rows)s" data-cols="%(cols)s">
@@ -55,6 +56,7 @@ def setup(app):
5556
class DataFileNode(nodes.General, nodes.Element, RunestoneIdNode):
5657
pass
5758

59+
5860
# self for these functions is an instance of the writer class. For example
5961
# in html, self is sphinx.writers.html.SmartyPantsHTMLTranslator
6062
# The node that is passed as a parameter is an instance of our node class.
@@ -74,9 +76,9 @@ def visit_df_html(self, node):
7476

7577

7678
def depart_df_html(self, node):
77-
""" This is called at the start of processing an datafile node. If datafile had recursive nodes
78-
etc and did not want to do all of the processing in visit_ac_html any finishing touches could be
79-
added here.
79+
"""This is called at the start of processing an datafile node. If datafile had recursive nodes
80+
etc and did not want to do all of the processing in visit_ac_html any finishing touches could be
81+
added here.
8082
"""
8183
pass
8284

@@ -91,14 +93,14 @@ def purge_datafiles(app, env, docname):
9193

9294
class DataFile(RunestoneIdDirective):
9395
"""
94-
.. datafile:: identifier
95-
:edit: Option that makes the datafile editable
96-
:cols: If editable, number of columns--default is 20
97-
:rows: If editable, number of rows--default is 40
98-
:hide: Flag that sets a non-editable datafile to be hidden
99-
:image: Flag that says this file is an image implies :fromfile: will be used
100-
:fromfile: path to file that contains the data
101-
"""
96+
.. datafile:: identifier
97+
:edit: Option that makes the datafile editable
98+
:cols: If editable, number of columns--default is 20
99+
:rows: If editable, number of rows--default is 40
100+
:hide: Flag that sets a non-editable datafile to be hidden
101+
:image: Flag that says this file is an image implies :fromfile: will be used
102+
:fromfile: path to file that contains the data
103+
"""
102104

103105
required_arguments = 1
104106
optional_arguments = 0
@@ -117,16 +119,16 @@ class DataFile(RunestoneIdDirective):
117119

118120
def run(self):
119121
"""
120-
process the multiplechoice directive and generate html for output.
121-
:param self:
122-
:return:
123-
.. datafile:: identifier
124-
:edit: Option that makes the datafile editable
125-
:cols: If editable, number of columns--default is 20
126-
:rows: If editable, number of rows--default is 40
127-
:hide: Flag that sets a non-editable datafile to be hidden
128-
:image:
129-
:fromfile: path to file that contains the data
122+
process the multiplechoice directive and generate html for output.
123+
:param self:
124+
:return:
125+
.. datafile:: identifier
126+
:edit: Option that makes the datafile editable
127+
:cols: If editable, number of columns--default is 20
128+
:rows: If editable, number of rows--default is 40
129+
:hide: Flag that sets a non-editable datafile to be hidden
130+
:image:
131+
:fromfile: path to file that contains the data
130132
"""
131133
super(DataFile, self).run()
132134
env = self.state.document.settings.env

0 commit comments

Comments
 (0)