diff --git a/traitlets/config/application.py b/traitlets/config/application.py index 1fd61c13..b01a11e5 100644 --- a/traitlets/config/application.py +++ b/traitlets/config/application.py @@ -973,8 +973,7 @@ def load_config_file( @catch_config_error def load_config_environ(self) -> None: """Load config files by environment.""" - - PREFIX = self.name.upper() + PREFIX = self.name.upper().replace("-", "_") new_config = Config() self.log.debug('Looping through config variables with prefix "%s"', PREFIX)