From 33c4016124ec9ca6765710197b3360bbd8c3241d Mon Sep 17 00:00:00 2001 From: dgelessus Date: Tue, 7 Jul 2020 00:04:54 +0200 Subject: [PATCH] Fix flake8 problems --- rsrcfork/__main__.py | 2 -- rsrcfork/compress/common.py | 2 +- rsrcfork/compress/dcmp0.py | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/rsrcfork/__main__.py b/rsrcfork/__main__.py index 5545c07..6019376 100644 --- a/rsrcfork/__main__.py +++ b/rsrcfork/__main__.py @@ -1,9 +1,7 @@ import argparse import enum import itertools -import pathlib import sys -import textwrap import typing from . import __version__, api, compress diff --git a/rsrcfork/compress/common.py b/rsrcfork/compress/common.py index 43de94f..6d16870 100644 --- a/rsrcfork/compress/common.py +++ b/rsrcfork/compress/common.py @@ -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: diff --git a/rsrcfork/compress/dcmp0.py b/rsrcfork/compress/dcmp0.py index c4c12a6..cfe0f49 100644 --- a/rsrcfork/compress/dcmp0.py +++ b/rsrcfork/compress/dcmp0.py @@ -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)