Skip to content

Commit

Permalink
Allow to load config from env.
Browse files Browse the repository at this point in the history
Latest version of traitlets allow to load config from env,

Env loading is opt-in for backward compatibility.
  • Loading branch information
Carreau committed Nov 28, 2023
1 parent f370e37 commit 31a5577
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nbconvert/nbconvertapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ def initialize(self, argv=None):

self.init_syspath()
super().initialize(argv)
return self.visit_unknown(node)
if hasattr(self, "load_config_environ"):
self.load_config_environ()
self.init_notebooks()
self.init_writer()
self.init_postprocessor()
Expand Down Expand Up @@ -655,6 +658,8 @@ def initialize(self, argv=None):
self.config.QtPDFExporter.paginate = False

super().initialize(argv)
if hasattr(self, "load_config_environ"):
self.load_config_environ()

@default("export_format")
def _default_export_format(self):
Expand Down

0 comments on commit 31a5577

Please sign in to comment.