From f2d719552a44f9a555b67ba47617400a872e407a Mon Sep 17 00:00:00 2001 From: oittaa <8972248+oittaa@users.noreply.github.com> Date: Mon, 21 Mar 2022 10:28:56 +0100 Subject: [PATCH] mypy has been fixed (#210) --- ibkr_report/tools.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ibkr_report/tools.py b/ibkr_report/tools.py index 0a212c88..0e280ca8 100644 --- a/ibkr_report/tools.py +++ b/ibkr_report/tools.py @@ -94,8 +94,6 @@ def calculate_sri_on_file(filename: str) -> str: return f"sha384-{hash_base64}" -# TODO: mypy "BinaryIO" has no attribute "readinto" # pylint: disable=fixme -# https://github.com/python/mypy/issues/11917 # TODO: pylint "Module 'hashlib' has no '_Hash' member" # pylint: disable=fixme # https://github.com/PyCQA/pylint/issues/5395 def update_hash( @@ -105,7 +103,7 @@ def update_hash( byte_array = bytearray(128 * 1024) memory_view = memoryview(byte_array) with open(filename, "rb", buffering=0) as file: - for block in iter(lambda: file.readinto(memory_view), 0): # type: ignore + for block in iter(lambda: file.readinto(memory_view), 0): hash_func.update(memory_view[:block])