-
Couldn't load subscription status.
- Fork 4
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
overview
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
specdoes 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
Typeto wrap abstract classes - See Use case for typing.Type with abstract types python/mypy#4717
- However, mypy does not allow
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working