Closed bandophahita closed 11 months ago
I added a test that shows the error: See https://github.com/bandophahita/screenpy/commit/937085225553178b6e24a814d6687436b3551f93
File "/Users/m.wilson/projects/screenpy/tests/test_actions.py", line 752, in test_implements_protocol
assert isinstance(q1, Describable)
AssertionError: assert False
+ where False = isinstance(<screenpy.actions.silently.SilentlyAnswerable object at 0x10398c310>, Describable)
It appears to occur with typing_extensions >=4.6.0. When using 4.5.0 or earlier, the error doesn't happen.
Importing Protocol
and runtime_checkable
from typing seems to fix the problem. Since we support python 3.8 or higher, this is a reasonable fix as both were added to python 3.8.
This appears to be fixed, thanks @bandophahita!
When using
Silent
to wrap a question, theget_additive_description
fails to recognize theSilentlyAnswerable
as being an instance ofDescribable
.