Skip to content

Commit ad4c5be

Browse files
committed
Rename 'root_n_low' to 'base'
1 parent 1679cc8 commit ad4c5be

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

importlib_metadata/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ class FastPath:
408408

409409
def __init__(self, root):
410410
self.root = root
411-
self._root_n_low = os.path.split(root)[1].lower()
411+
self.base = os.path.basename(root).lower()
412412

413413
def joinpath(self, child):
414414
return pathlib.Path(self.root, child)
@@ -431,11 +431,11 @@ def zip_children(self):
431431
)
432432

433433
def is_egg(self, search):
434-
root_n_low = self._root_n_low
434+
base = self.base
435435
return (
436-
root_n_low == search.versionless_egg_name
437-
or root_n_low.startswith(search.prefix)
438-
and root_n_low.endswith('.egg'))
436+
base == search.versionless_egg_name
437+
or base.startswith(search.prefix)
438+
and base.endswith('.egg'))
439439

440440
def search(self, name):
441441
for child in self.children():

0 commit comments

Comments
 (0)