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
Creating doubles of abstract interfaces defined using ABC is a great way to use to use decoy, and it works! However, given the way Decoy::create_decoy is typed, mypy throws an error when you try to pass an ABC as spec.
acceptance criteria
Passing an ABC as spec does not throw a type error
implementation notes
I think a mypy plugin could work here, but that feels like a last resort
Currently, for creating class doubles, we rely on Type[GenericT]
However, mypy does not allow Type to wrap abstract classes
overview
Creating doubles of abstract interfaces defined using
ABC
is a great way to use to use decoy, and it works! However, given the wayDecoy::create_decoy
is typed, mypy throws an error when you try to pass an ABC asspec
.acceptance criteria
spec
does not throw a type errorimplementation notes
Type[GenericT]
Type
to wrap abstract classesThe text was updated successfully, but these errors were encountered: