Fix feedback

Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
Dan Ryan
2018-11-13 01:23:19 -05:00
parent d73879b5e5
commit e328ae24df
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -150,15 +150,15 @@ class SystemPath(object):
def _remove_path(self, path):
path_copy = reversed(self.path_order[:])
new_order = []
target = os.path.normcase(os.path.normpath(os.path.abspath(path)))
target = normalize_path(path)
path_map = {
os.path.normcase(os.path.normpath(os.path.abspath(pth))): pth
normalize_path(pth): pth
for pth in self.paths.keys()
}
if target in path_map:
del self.paths[path_map.get(target)]
for current_path in path_copy:
normalized = os.path.normcase(os.path.normpath(os.path.abspath(current_path)))
normalized = normalize_path(current_path)
if normalized != target:
new_order.append(normalized)
new_order = reversed(new_order)
+1 -1
View File
@@ -114,7 +114,7 @@ def _filter_none(k, v):
def normalize_path(path):
return os.path.normpath(os.path.normcase(os.path.abspath(path)))
return os.path.normpath(os.path.normcase(os.path.abspath(str(path))))
@lru_cache(maxsize=1024)
+1 -1
View File
@@ -34,7 +34,7 @@ requirementslib==1.3.0
pyparsing==2.2.2
pytoml==0.1.19
plette==0.2.2
tomlkit==0.5.2
tomlkit==0.4.6
shellingham==1.2.7
six==1.11.0
semver==2.8.1