summaryrefslogtreecommitdiff
path: root/tests/functional/p/protocol_classes.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/p/protocol_classes.py')
-rw-r--r--tests/functional/p/protocol_classes.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/functional/p/protocol_classes.py b/tests/functional/p/protocol_classes.py
new file mode 100644
index 000000000..0399c94e5
--- /dev/null
+++ b/tests/functional/p/protocol_classes.py
@@ -0,0 +1,12 @@
+# pylint: disable=missing-docstring
+import typing
+
+
+class Hasher(typing.Protocol):
+ """A hashing algorithm, e.g. :func:`hashlib.sha256`."""
+
+ def update(self, blob: bytes):
+ ...
+
+ def digest(self) -> bytes:
+ ...