Skip to content

Commit 861665d

Browse files
authored
fix loop variable names
1 parent 7be1923 commit 861665d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

traitlets/config/application.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ def _load_config_files(cls, basefilename, path=None, log=None, raise_config_file
830830

831831
if not isinstance(path, list):
832832
path = [path]
833-
for path in path[::-1]:
833+
for path in reversed(path):
834834
# path list is in descending priority order, so load files backwards:
835835
pyloader = cls.python_config_loader_class(basefilename + ".py", path=path, log=log)
836836
if log:
@@ -882,17 +882,17 @@ def load_config_file(self, filename, path=None):
882882
"""Load config files by filename and path."""
883883
filename, ext = os.path.splitext(filename)
884884
new_config = Config()
885-
for (config, filename) in self._load_config_files(
885+
for (config, fname) in self._load_config_files(
886886
filename,
887887
path=path,
888888
log=self.log,
889889
raise_config_file_errors=self.raise_config_file_errors,
890890
):
891891
new_config.merge(config)
892892
if (
893-
filename not in self._loaded_config_files
893+
fname not in self._loaded_config_files
894894
): # only add to list of loaded files if not previously loaded
895-
self._loaded_config_files.append(filename)
895+
self._loaded_config_files.append(fname)
896896
# add self.cli_config to preserve CLI config priority
897897
new_config.merge(self.cli_config)
898898
self.update_config(new_config)

0 commit comments

Comments
 (0)