diff --git a/IPython/nbconvert/exporters/exporter.py b/IPython/nbconvert/exporters/exporter.py index 60fcb23..775fe39 100644 --- a/IPython/nbconvert/exporters/exporter.py +++ b/IPython/nbconvert/exporters/exporter.py @@ -100,14 +100,13 @@ class Exporter(LoggingConfigurable): def default_config(self): return Config() - @nbformat.docstring_nbformat_mod def from_notebook_node(self, nb, resources=None, **kw): """ Convert a notebook from a notebook node instance. Parameters ---------- - nb : :class:`~{nbformat_mod}.nbbase.NotebookNode` + nb : :class:`~IPython.nbformat.current.NotebookNode` Notebook node resources : dict Additional resources that can be accessed read/write by diff --git a/IPython/nbconvert/exporters/templateexporter.py b/IPython/nbconvert/exporters/templateexporter.py index b3f1451..9ca1f65 100644 --- a/IPython/nbconvert/exporters/templateexporter.py +++ b/IPython/nbconvert/exporters/templateexporter.py @@ -27,7 +27,6 @@ from IPython.utils.traitlets import MetaHasTraits, Unicode, List, Dict, Any from IPython.utils.importstring import import_item from IPython.utils import py3compat, text -from IPython.nbformat.current import docstring_nbformat_mod from IPython.nbconvert import filters from .exporter import Exporter @@ -193,14 +192,13 @@ class TemplateExporter(Exporter): self.log.info("Loaded template %s", try_name) break - @docstring_nbformat_mod def from_notebook_node(self, nb, resources=None, **kw): """ Convert a notebook from a notebook node instance. Parameters ---------- - nb : :class:`~{nbformat_mod}.nbbase.NotebookNode` + nb : :class:`~IPython.nbformat.current.NotebookNode` Notebook node resources : dict Additional resources that can be accessed read/write by diff --git a/IPython/nbformat/current.py b/IPython/nbformat/current.py index 6bba5c2..aa00cb4 100644 --- a/IPython/nbformat/current.py +++ b/IPython/nbformat/current.py @@ -2,7 +2,6 @@ from __future__ import print_function -from xml.etree import ElementTree as ET import re from IPython.utils.py3compat import unicode_type @@ -34,16 +33,6 @@ current_nbformat_minor = nbformat_minor current_nbformat_module = _v_latest.__name__ -def docstring_nbformat_mod(func): - """Decorator for docstrings referring to classes/functions accessed through - nbformat.current. - - Put {nbformat_mod} in the docstring in place of 'IPython.nbformat.v3'. - """ - func.__doc__ = func.__doc__.format(nbformat_mod=current_nbformat_module) - return func - - class NBFormatError(ValueError): pass