Skip to content

Commit

Permalink
Ran pyupgrade for Python 3.7+.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Feb 15, 2023
1 parent f4a04db commit 7e8ba95
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions zipp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _implied_dirs(names):
return _dedupe(_difference(as_dirs, names))

def namelist(self):
names = super(CompleteDirs, self).namelist()
names = super().namelist()
return names + list(self._implied_dirs(names))

def _name_set(self):
Expand All @@ -118,7 +118,7 @@ def getinfo(self, name):
Supplement getinfo for implied dirs.
"""
try:
return super(CompleteDirs, self).getinfo(name)
return super().getinfo(name)
except KeyError:
if not name.endswith('/') or name not in self._name_set():
raise
Expand Down Expand Up @@ -153,13 +153,13 @@ class FastLookup(CompleteDirs):
def namelist(self):
with contextlib.suppress(AttributeError):
return self.__names
self.__names = super(FastLookup, self).namelist()
self.__names = super().namelist()
return self.__names

def _name_set(self):
with contextlib.suppress(AttributeError):
return self.__lookup
self.__lookup = super(FastLookup, self)._name_set()
self.__lookup = super()._name_set()
return self.__lookup


Expand Down Expand Up @@ -360,7 +360,7 @@ def _descendants(self):

def glob(self, pattern):
if not pattern:
raise ValueError("Unacceptable pattern: {!r}".format(pattern))
raise ValueError(f"Unacceptable pattern: {pattern!r}")

matches = re.compile(fnmatch.translate(pattern)).fullmatch
return (
Expand Down

0 comments on commit 7e8ba95

Please sign in to comment.