From 31a5577b1c0f44e5bcbf472c206a69540095d175 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Tue, 28 Nov 2023 11:58:24 +0100 Subject: [PATCH 1/2] Allow to load config from env. Latest version of traitlets allow to load config from env, Env loading is opt-in for backward compatibility. --- nbconvert/nbconvertapp.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nbconvert/nbconvertapp.py b/nbconvert/nbconvertapp.py index 78a0724ea..fd73abdb7 100755 --- a/nbconvert/nbconvertapp.py +++ b/nbconvert/nbconvertapp.py @@ -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() @@ -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): From 51e0b496de05c92faf8d2031779693ca588bbdab Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Sun, 3 Dec 2023 19:08:20 +0100 Subject: [PATCH 2/2] typo --- nbconvert/nbconvertapp.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nbconvert/nbconvertapp.py b/nbconvert/nbconvertapp.py index fd73abdb7..0b2a68f50 100755 --- a/nbconvert/nbconvertapp.py +++ b/nbconvert/nbconvertapp.py @@ -357,7 +357,6 @@ 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()