Skip to content

Commit 1881420

Browse files
fix: mro_trait can be unbound when the class is not in mro (#824)
Closes #823
1 parent 2cdbe59 commit 1881420

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

traitlets/traitlets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ def setup_class(cls, classdict): # noqa
10201020
cls._traits[name] = value
10211021
trait = value
10221022
default_method_name = "_%s_default" % name
1023+
mro_trait = mro
10231024
try:
10241025
mro_trait = mro[: mro.index(trait.this_class) + 1] # type:ignore[arg-type]
10251026
except ValueError:

0 commit comments

Comments
 (0)