Closed ashwin153 closed 2 years ago
@mkorpela My bad I created a commit with the intention of creating a PR, but it automatically merged it.
Can you back out my commit and then create a new PR with it (if you don't like the change)? Sorry about that.
https://github.com/mkorpela/overrides/commit/1aede9d4b58010d16ce850689f223713c0be5937
It should be or
not and
my bad.
Ok backed out the change. Sorry about that.
I think this is fine. Closing this issue. Other way is ok: if super return is not specified then sub return can be whatever.
Currently, subclasses are required to have a return type-hint if the superclass defines one.
This is because
and sub_return is not None
is missing on the following line.https://github.com/mkorpela/overrides/blob/deb0f3f291d8797e7f1a8f3137ad6e8e6e3898cf/overrides/signature.py#L286-L288