Fixed for mypy errors

This commit is contained in:
Dimitris Zlatanidis 2024-04-22 22:04:19 +03:00
parent 705d1dc868
commit f60c80e247

View file

@ -1,6 +1,8 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# mypy: disable-error-code="no-redef"
import hashlib
from pathlib import Path
from typing import Union
@ -35,7 +37,7 @@ class Md5sum(Configs):
self.ascii.draw_checksum_error_box(filename, checksum, file_check)
self.view.question()
def read_binary_file(self, filename: Union[str, Path]) -> bytes:
def read_binary_file(self, filename: Union[str, Path]) -> bytes: # type: ignore[return]
try:
with open(filename, 'rb') as file:
return file.read()