diff --git a/nbconvert/transformers/base.py b/nbconvert/transformers/base.py index f030d47..3efed7a 100755 --- a/nbconvert/transformers/base.py +++ b/nbconvert/transformers/base.py @@ -53,6 +53,9 @@ class ConfigurableTransformer(Configurable): def __call__(self, nb, resources): + return self.call(nb,resources) + + def call(self, nb, resources): """ Transformation to apply on each notebook. @@ -95,4 +98,4 @@ class ConfigurableTransformer(Configurable): raise NotImplementedError('should be implemented by subclass') return cell, resources - \ No newline at end of file + diff --git a/nbconvert/transformers/sphinx.py b/nbconvert/transformers/sphinx.py index 313f522..69600c3 100755 --- a/nbconvert/transformers/sphinx.py +++ b/nbconvert/transformers/sphinx.py @@ -111,28 +111,7 @@ class SphinxTransformer(ActivatableTransformer): overridetitle = Unicode("", config=True, help="") - def __call__(self, nb, resources): - """ - Entrypoint - Since we are not interested in any additional manipulation on a cell - by cell basis, we do not call the base implementation. - - Parameters - ---------- - nb : NotebookNode - Notebook being converted - resources : dictionary - Additional resources used in the conversion process. Allows - transformers to pass variables into the Jinja engine. - """ - - if self.enabled: - return self.transform(nb, resources) - else: - return nb,resources - - - def transform(self, nb, resources): + def call(self, nb, resources): """ Sphinx transformation to apply on each notebook. @@ -279,4 +258,4 @@ class SphinxTransformer(ActivatableTransformer): 6: "(for international documents)"} return nbconvert.utils.console.prompt_dictionary(styles, menu_comments=comments) - \ No newline at end of file +