Skip to content

Commit

Permalink
PEP8/mypy
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
  • Loading branch information
miurahr committed Aug 9, 2020
1 parent 27f65e8 commit ef6bcab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions py7zr/compressor.py
Expand Up @@ -575,7 +575,6 @@ def flush(self):
} # type: Dict[int, Tuple[Any, Any]]



class LZMA1Decompressor(ISevenZipDecompressor):
def __init__(self, filters, unpacksize):
self._decompressor = lzma.LZMADecompressor(format=lzma.FORMAT_RAW, filters=filters)
Expand Down Expand Up @@ -617,7 +616,7 @@ def __init__(self, coders: List[Dict[str, Any]], packsize: int, unpacksizes: Lis
self.methods_map[bcj_index] = False
break
# --------- end of Hack for special combinations
self.chain = [] # type: Union[bz2.BZ2Decompressor, lzma.LZMADecompressor, ISevenZipDecompressor]
self.chain = [] # type: List[Union[bz2.BZ2Decompressor, lzma.LZMADecompressor, ISevenZipDecompressor]]
self._unpacksizes = [] # type: List[int]
self.input_size = self.input_size
shift = 0
Expand Down Expand Up @@ -776,7 +775,7 @@ def __init__(self, filters=None, password=None):
if not any(self.methods_map): # all alternative
for filter in filters:
self._set_alternate_compressors_coders(filter['id'], password)
elif SupportedMethods.is_crypto_id(self.filters[-1]['id']) and all(self.methods_map[:-1]): # Crypto + native compression
elif SupportedMethods.is_crypto_id(self.filters[-1]['id']) and all(self.methods_map[:-1]):
self._set_native_compressors_coders(self.filters[:-1])
self._set_alternate_compressors_coders(self.filters[-1]['id'], password)
else:
Expand Down

0 comments on commit ef6bcab

Please sign in to comment.