Skip to content

Commit

Permalink
Attempt to fix CI issues
Browse files Browse the repository at this point in the history
Attempt to fix error for Test Python 3.9 on ubuntu-22.04
  • Loading branch information
nepiskopos authored May 11, 2024
1 parent 8e2d329 commit fddc379
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions py7zr/py7zr.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,11 @@ def _extract(
fnames: Dict[str, int] = {} # check duplicated filename in one archive?
self.q.put(("pre", None, None))
for f in self.files:
if targets is not None and recursive == False:
if targets is not None and recursive is False:
if f.filename not in targets:
self.worker.register_filelike(f.id, None)
continue
elif targets is not None and recursive == True:
elif targets is not None and recursive is True:
if f.filename not in targets and not any([f.filename.startswith(target) for target in targets]):
self.worker.register_filelike(f.id, None)
continue
Expand Down Expand Up @@ -1003,7 +1003,8 @@ def read(self, targets: Optional[Collection[str]] = None) -> Optional[Dict[str,
self._dict = {}
return self._extract(path=None, targets=targets, return_dict=True)

def extract(self, path: Optional[Any] = None, targets: Optional[Collection[str]] = None, recursive: Optional[bool] = False) -> None:
def extract(self, path: Optional[Any] = None, targets: Optional[Collection[str]] = None,
recursive: Optional[bool] = False) -> None:
if not self._is_none_or_collection(targets):
raise TypeError("Wrong argument type given.")
self._extract(path, targets, return_dict=False, recursive=recursive)
Expand Down

0 comments on commit fddc379

Please sign in to comment.