Skip to content

Commit

Permalink
fix: mro_trait can be unbound when the class is not in mro (#824)
Browse files Browse the repository at this point in the history
Closes #823
  • Loading branch information
maartenbreddels authored Jan 8, 2023
1 parent 2cdbe59 commit 1881420
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions traitlets/traitlets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,7 @@ def setup_class(cls, classdict): # noqa
cls._traits[name] = value
trait = value
default_method_name = "_%s_default" % name
mro_trait = mro
try:
mro_trait = mro[: mro.index(trait.this_class) + 1] # type:ignore[arg-type]
except ValueError:
Expand Down

0 comments on commit 1881420

Please sign in to comment.