Commit f8681a4a authored by inkhey's avatar inkhey

fix typing issue with mypy and Protocol

parent affec0ac
......@@ -2,8 +2,13 @@ from abc import abstractmethod
import hashlib
import typing
try:
from typing import Protocol
except ImportError:
from typing_extensions import Protocol # type: ignore
class Chooser(typing.Protocol):
class Chooser(Protocol):
"""
Interface for chooser,
chooser does one thing: they choose in a sequence item according to a seed given
......@@ -20,7 +25,7 @@ class Chooser(typing.Protocol):
pass
class HashAlgorithm(typing.Protocol):
class HashAlgorithm(Protocol):
"""Hash Algorithm Interface for HashLibChooser """
@abstractmethod
......
......@@ -15,12 +15,13 @@ except UnicodeDecodeError:
install_requires = [
"Pillow",
"typing"
]
tests_require = ["pytest"]
devtools_require = ["flake8", "isort", "mypy", "pre-commit"]
if sys.version_info.major == 3 and sys.version_info.minor >= 6:
devtools_require.append("black")
if sys.version_info.major == 3 and sys.version_info.minor <= 7:
install_requires.append("typing_extensions")
setup(
name="pioupiou",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment