From 4141dd82af857484fe901fbd962f9c61ccdad56f Mon Sep 17 00:00:00 2001 From: a Date: Wed, 21 Oct 2020 22:45:55 +0300 Subject: [PATCH] cleaning --- xonsh/commands_cache.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xonsh/commands_cache.py b/xonsh/commands_cache.py index 35b42be12..1ffbd2f86 100644 --- a/xonsh/commands_cache.py +++ b/xonsh/commands_cache.py @@ -100,16 +100,14 @@ class CommandsCache(cabc.Mapping): self._path_mtime = max_mtime if cache_valid_path and cache_valid_paths: - if cache_valid_aliases: - return self._cmds_cache - else: + if not cache_valid_aliases: for cmd, alias in alss.items(): key = cmd.upper() if ON_WINDOWS else cmd if key in self._cmds_cache: self._cmds_cache[key] = (self._cmds_cache[key][0], alias) else: self._cmds_cache[key] = (cmd, True) - return self._cmds_cache + return self._cmds_cache allcmds = {} for path in reversed(path_immut):