##// END OF EJS Templates
do not ask to inherit __call__ but call
Matthias BUSSONNIER -
Show More
@@ -53,6 +53,9 b' class ConfigurableTransformer(Configurable):'
53
53
54
54
55 def __call__(self, nb, resources):
55 def __call__(self, nb, resources):
56 return self.call(nb,resources)
57
58 def call(self, nb, resources):
56 """
59 """
57 Transformation to apply on each notebook.
60 Transformation to apply on each notebook.
58
61
@@ -95,4 +98,4 b' class ConfigurableTransformer(Configurable):'
95
98
96 raise NotImplementedError('should be implemented by subclass')
99 raise NotImplementedError('should be implemented by subclass')
97 return cell, resources
100 return cell, resources
98 No newline at end of file
101
@@ -111,28 +111,7 b' class SphinxTransformer(ActivatableTransformer):'
111 overridetitle = Unicode("", config=True, help="")
111 overridetitle = Unicode("", config=True, help="")
112
112
113
113
114 def __call__(self, nb, resources):
114 def call(self, nb, resources):
115 """
116 Entrypoint
117 Since we are not interested in any additional manipulation on a cell
118 by cell basis, we do not call the base implementation.
119
120 Parameters
121 ----------
122 nb : NotebookNode
123 Notebook being converted
124 resources : dictionary
125 Additional resources used in the conversion process. Allows
126 transformers to pass variables into the Jinja engine.
127 """
128
129 if self.enabled:
130 return self.transform(nb, resources)
131 else:
132 return nb,resources
133
134
135 def transform(self, nb, resources):
136 """
115 """
137 Sphinx transformation to apply on each notebook.
116 Sphinx transformation to apply on each notebook.
138
117
@@ -279,4 +258,4 b' class SphinxTransformer(ActivatableTransformer):'
279 6: "(for international documents)"}
258 6: "(for international documents)"}
280
259
281 return nbconvert.utils.console.prompt_dictionary(styles, menu_comments=comments)
260 return nbconvert.utils.console.prompt_dictionary(styles, menu_comments=comments)
282 No newline at end of file
261
General Comments 0
You need to be logged in to leave comments. Login now