Skip to content

Commit 936525b

Browse files
authored
Pass **kwds in MetaHasDescriptors __new__ and __init__ (#881)
Co-authored-by: Alan Fleming <Alan.Fleming@utas.edu.au>
1 parent a80f16a commit 936525b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

traitlets/traitlets.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ class MetaHasDescriptors(type):
965965
instantiated and sets their name attribute.
966966
"""
967967

968-
def __new__(mcls, name, bases, classdict): # noqa
968+
def __new__(mcls, name, bases, classdict, **kwds): # noqa
969969
"""Create the HasDescriptors class."""
970970
for k, v in classdict.items():
971971
# ----------------------------------------------------------------
@@ -981,11 +981,11 @@ def __new__(mcls, name, bases, classdict): # noqa
981981
classdict[k] = v()
982982
# ----------------------------------------------------------------
983983

984-
return super().__new__(mcls, name, bases, classdict)
984+
return super().__new__(mcls, name, bases, classdict, **kwds)
985985

986-
def __init__(cls, name: str, bases: t.Any, classdict: t.Any) -> None:
986+
def __init__(cls, name: str, bases: t.Any, classdict: t.Any, **kwds) -> None:
987987
"""Finish initializing the HasDescriptors class."""
988-
super().__init__(name, bases, classdict)
988+
super().__init__(name, bases, classdict, **kwds)
989989
cls.setup_class(classdict)
990990

991991
def setup_class(cls, classdict):

0 commit comments

Comments
 (0)