Skip to content

Commit

Permalink
fix import annotation error / How Fix it?
Browse files Browse the repository at this point in the history
  • Loading branch information
rocaz committed Sep 11, 2021
1 parent 5c56003 commit a6e7a7b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions probeCOCOATek/probeCOCOATek.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
if sys.version_info.major == 3 and sys.version_info.minor >= 7:
from __future__ import annotations
import sys
import os
import io
Expand All @@ -17,7 +15,6 @@
from probeCOCOATek import __version__
from probeCOCOATek.TemporaryExposureKey.TemporaryExposureKey_pb2 import TemporaryExposureKeyExport


class Error(Exception):
pass
class AugumentError(Error):
Expand Down Expand Up @@ -102,7 +99,7 @@ def _get_zip_file(self, filename:str) -> bytes:
return zip_content


def _extract_key_zip(self, zip_content:bytes) -> tuple(bytes, bytes):
def _extract_key_zip(self, zip_content:bytes) -> (bytes, bytes):
try:
z = zipfile.ZipFile(io.BytesIO(zip_content))
except zipfile.BadZipFile as e:
Expand All @@ -116,7 +113,7 @@ def _parse_export_key(self, pb_bin:bytes) -> TemporaryExposureKeyExport:
tek_bin.ParseFromString(pb_bin)
except pbm.DecodeError as e:
#print('DecodeError: {}'.format(e))
None
pass
except Exception as e:
print('Error: {}'.format(e))
return tek_bin
Expand Down

0 comments on commit a6e7a7b

Please sign in to comment.