You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sample code for: Implementing Interfaces in Python: ABCs and Protocols (#758)
* Sample code for: Implementing Interfaces in Python: ABCs and Protocols
* Sync python-interface materials with tutorial update
- Fix typo in check_protocols.py import (readers_protocols -> readers_protocol).
- Import runtime_checkable in readers_protocol.py so uncommenting the
decorator doesn't NameError.
- Remove meta_classes.py and check_virtual_classes.py: the metaclass-based
virtual subclass example was dropped from the updated tutorial in favor
of typing.Protocol + @runtime_checkable.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Enable @runtime_checkable in readers_protocol.py
Matches the tutorial's final state (highlighted block in the Runtime
Type-Checking Protocol Subtypes section) and silences the F401 ruff
error for the unused runtime_checkable import.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Final QA
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Bartosz Zaczyński <bartosz.zaczynski@gmail.com>
# Implementing Interfaces in Python: ABCs and Protocols
2
+
3
+
This folder provides the code examples for the Real Python tutorial [Implementing Interfaces in Python: ABCs and Protocols](https://realpython.com/python-interface/)
0 commit comments