Expand usage of the target function has kwargs
and uses kwargs.get
.
class NewCls:
def __init__(self, c: float, d: str = "abc", **kwargs):
self.my_c = c
self.my_d = d
self.my_e = kwargs.get("e", 0.2)
class PastCls(NewCls):
@deprecated(target=NewCls, deprecated_in="0.2", remove_in="0.4")
def __init__(self, c: int, d: str = "efg", **kwargs):
pass
Thanks to @jungbaepark