From faafb61241bac80845b3e7d02295c9f5c673c20f Mon Sep 17 00:00:00 2001 From: scito Date: Thu, 29 Dec 2022 22:12:07 +0100 Subject: [PATCH] fix type hint compatibility with Python < 3.11 --- extract_otp_secret_keys.py | 1 + setup.py | 1 + test_extract_otp_secret_keys_pytest.py | 1 + test_extract_otp_secret_keys_unittest.py | 1 + test_extract_qrcode_unittest.py | 1 + 5 files changed, 5 insertions(+) diff --git a/extract_otp_secret_keys.py b/extract_otp_secret_keys.py index 7aafcdc..ba5e339 100644 --- a/extract_otp_secret_keys.py +++ b/extract_otp_secret_keys.py @@ -41,6 +41,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import annotations # for compatibility with Python < 3.11 import argparse import base64 import csv diff --git a/setup.py b/setup.py index 1b291aa..1514d72 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ +from __future__ import annotations # for compatibility with Python < 3.11 import pathlib from setuptools import setup # type: ignore diff --git a/test_extract_otp_secret_keys_pytest.py b/test_extract_otp_secret_keys_pytest.py index 0e81543..5928833 100644 --- a/test_extract_otp_secret_keys_pytest.py +++ b/test_extract_otp_secret_keys_pytest.py @@ -18,6 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import annotations # for compatibility with Python < 3.11 import io import os import pathlib diff --git a/test_extract_otp_secret_keys_unittest.py b/test_extract_otp_secret_keys_unittest.py index 6a2d836..1025597 100644 --- a/test_extract_otp_secret_keys_unittest.py +++ b/test_extract_otp_secret_keys_unittest.py @@ -18,6 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import annotations # for compatibility with Python < 3.11 import io import os import sys diff --git a/test_extract_qrcode_unittest.py b/test_extract_qrcode_unittest.py index d7298ee..75a4342 100644 --- a/test_extract_qrcode_unittest.py +++ b/test_extract_qrcode_unittest.py @@ -18,6 +18,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +from __future__ import annotations # for compatibility with Python < 3.11 import unittest import extract_otp_secret_keys