Skip to content

Commit

Permalink
mypy has been fixed (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
oittaa authored Mar 21, 2022
1 parent 81e5605 commit f2d7195
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ibkr_report/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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])


Expand Down

0 comments on commit f2d7195

Please sign in to comment.