summaryrefslogtreecommitdiff
path: root/puzzles/22_protocol_missing_member.py
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2022-02-25 07:27:19 +0100
committerMartin Fischer <martin@push-f.com>2022-02-25 07:27:19 +0100
commit8a6d70aef46b4fd44fcd93d1b9ce48e13d26597c (patch)
treea1d485f90e2926b4493ae88b017d15d73e0a8684 /puzzles/22_protocol_missing_member.py
parenteb33dd8b76df22cbce1c30c905d5e729b5bc9ecd (diff)
add puzzle for protocol with missing member
Diffstat (limited to 'puzzles/22_protocol_missing_member.py')
-rw-r--r--puzzles/22_protocol_missing_member.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/puzzles/22_protocol_missing_member.py b/puzzles/22_protocol_missing_member.py
new file mode 100644
index 0000000..79bd70e
--- /dev/null
+++ b/puzzles/22_protocol_missing_member.py
@@ -0,0 +1,7 @@
+from typing import Protocol
+
+class P(Protocol):
+ x: int
+
+class B(P): # error
+ pass