25
25
26
26
27
27
# These classes were in the .util module of the original directive.
28
- # TODO: PATCHED
29
28
class _Singleton (type ):
30
29
_instances = {}
31
30
@@ -66,7 +65,6 @@ def run_command(command, working_directory):
66
65
# terminal, which are harder to be parsed and/or rendered in Sphinx.
67
66
# For that reason, we define --disable-color in the CWLTOOL_OPTIONS
68
67
# environment variable, which is used by ``cwltool``.
69
- # TODO: PATCHED
70
68
env = os .environ
71
69
env ['CWLTOOL_OPTIONS' ] = '--disable-color'
72
70
subp = subprocess .Popen (
@@ -113,7 +111,6 @@ class RunCmdDirective(code.CodeBlock):
113
111
"replace" : directives .unchanged ,
114
112
"prompt" : directives .flag ,
115
113
"dedent-output" : int ,
116
- # TODO: PATCHED
117
114
"working-directory" : directives .unchanged
118
115
}
119
116
@@ -126,7 +123,6 @@ def run(self):
126
123
# allow the directive to receive a working directory, so that we
127
124
# change to that working directory before running the desired command.
128
125
# The working directory is omitted from the final output.
129
- # TODO: PATCHED
130
126
working_directory = self .options .get ('working-directory' , 'src/_includes/cwl/' )
131
127
if working_directory == '' :
132
128
# subprocess default value, so that we can disable it if needed.
@@ -143,13 +139,13 @@ def run(self):
143
139
output = cache .get (command , working_directory )
144
140
145
141
# Grab our custom commands
146
- syntax = self .options .get ("syntax" , "bash" ) # TODO: PATCHED
142
+ syntax = self .options .get ("syntax" , "bash" )
147
143
replace = self .options .get ("replace" , '' )
148
144
reader = csv .reader ([replace ], delimiter = "," , escapechar = "\\ " )
149
145
# prompt = "prompt" in self.options
150
146
# We patched this so that the prompt is displayed by default, similar
151
147
# to how ``{code-block} console`` works.
152
- prompt = True # TODO: PATCHED
148
+ prompt = True
153
149
dedent_output = self .options .get ("dedent-output" , 0 )
154
150
155
151
# Dedent the output if required
0 commit comments