Fix flake8 problems

This commit is contained in:
dgelessus 2020-07-07 00:04:54 +02:00
parent b01cfc77cf
commit 33c4016124
3 changed files with 4 additions and 6 deletions

View File

@ -1,9 +1,7 @@
import argparse
import enum
import itertools
import pathlib
import sys
import textwrap
import typing
from . import __version__, api, compress

View File

@ -41,7 +41,7 @@ class CompressedHeaderInfo(object):
try:
signature, header_length, compression_type, decompressed_length, remainder = STRUCT_COMPRESSED_HEADER.unpack(stream.read(STRUCT_COMPRESSED_HEADER.size))
except struct.error:
raise DecompressError(f"Invalid header")
raise DecompressError("Invalid header")
if signature != COMPRESSED_SIGNATURE:
raise DecompressError(f"Invalid signature: {signature!r}, expected {COMPRESSED_SIGNATURE!r}")
if header_length != 0x12:

View File

@ -110,7 +110,7 @@ def decompress_stream_inner(header_info: common.CompressedHeaderInfo, stream: ty
# Compact representation of (part of) a segment loader jump table, as used in 'CODE' (0) resources.
if debug:
print(f"Segment loader jump table entries")
print("Segment loader jump table entries")
# All generated jump table entries have the same segment number.
segment_number_int = common.read_variable_length_integer(stream)
@ -174,7 +174,7 @@ def decompress_stream_inner(header_info: common.CompressedHeaderInfo, stream: ty
# A sequence of 16-bit signed integers, with each integer encoded as a difference relative to the previous integer. The first integer is stored explicitly.
if debug:
print(f"Difference-encoded 16-bit integers")
print("Difference-encoded 16-bit integers")
# The first integer is stored explicitly, as a signed value.
initial_int = common.read_variable_length_integer(stream)
@ -206,7 +206,7 @@ def decompress_stream_inner(header_info: common.CompressedHeaderInfo, stream: ty
# A sequence of 32-bit signed integers, with each integer encoded as a difference relative to the previous integer. The first integer is stored explicitly.
if debug:
print(f"Difference-encoded 32-bit integers")
print("Difference-encoded 32-bit integers")
# The first integer is stored explicitly, as a signed value.
initial_int = common.read_variable_length_integer(stream)