Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docstring issue and a broken link #1576

Merged
merged 17 commits into from
Jun 8, 2021
Merged
2 changes: 1 addition & 1 deletion nbconvert/exporters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def export(exporter, nb, **kw):

Parameters
----------
exporter : `Exporter` class or instance
exporter : ``Exporter`` class or instance
Class or instance of the exporter that should be used. If the
method initializes its own instance of the class, it is ASSUMED that
the class type provided exposes a constructor (``__init__``) with the same
Expand Down
6 changes: 3 additions & 3 deletions nbconvert/exporters/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ def register_preprocessor(self, preprocessor, enabled=False):
"""
Register a preprocessor.
Preprocessors are classes that act upon the notebook before it is
passed into the Jinja templating engine. preprocessors are also
passed into the Jinja templating engine. Preprocessors are also
capable of passing additional information to the Jinja
templating engine.

Parameters
----------
preprocessor : `Preprocessor`
preprocessor : `nbconvert.preprocessors.Preprocessor`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am not sure if this is the correct preprocessor object. It is either this or .base.Preprocessor. but this was causing the docs to fail too.

A dotted module name, a type, or an instance
enabled : bool
Mark the preprocessor as enabled
Expand Down Expand Up @@ -316,7 +316,7 @@ def _preprocess(self, nb, resources):
# to each preprocessor
for preprocessor in self._preprocessors:
nbc, resc = preprocessor(nbc, resc)
try:
try:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my text editor Atom must do something with spaces. i hope this isn't problematic. if it is i can try to fix it.

nbformat.validate(nbc, relax_add_props=True)
except nbformat.ValidationError:
self.log.error('Notebook is invalid after preprocessor %s',
Expand Down
2 changes: 1 addition & 1 deletion nbconvert/exporters/webpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _template_data_paths_default(self):
where JS in your notebook can execute serverside code! Please use with
caution.

https://github.com/puppeteer/puppeteer/blob/main@%7B2020-12-14T17:22:24Z%7D/docs/troubleshooting.md#setting-up-chrome-linux-sandbox
``https://github.com/puppeteer/puppeteer/blob/main@%7B2020-12-14T17:22:24Z%7D/docs/troubleshooting.md#setting-up-chrome-linux-sandbox``
has more information.

This is required for webpdf to work inside most container environments.
Expand Down
2 changes: 1 addition & 1 deletion nbconvert/nbconvertapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def _postprocessor_class_changed(self, change):
help="""The export format to be used, either one of the built-in formats
{formats}
or a dotted object name that represents the import path for an
`Exporter` class""".format(formats=get_export_names())
``Exporter`` class""".format(formats=get_export_names())
).tag(config=True)

notebooks = List([], help="""List of notebooks to convert.
Expand Down