@_immutable_init
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
+ # make ncls have the same name and module as cls
+ ncls.__name__ = cls.__name__
+ ncls.__qualname__ = cls.__qualname__
+ ncls.__module__ = cls.__module__
return ncls
@_immutable_init
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
+ # make ncls have the same name and module as cls
+ ncls.__name__ = cls.__name__
+ ncls.__qualname__ = cls.__qualname__
+ ncls.__module__ = cls.__module__
return ncls