Skip to content

Commit 1c85d41

Browse files
perf: all instances that are None are immutable and static
1 parent 09ca954 commit 1c85d41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

traitlets/traitlets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ def setup_class(cls, classdict): # noqa
10601060
elif type(trait) == Union and trait.default_value is None:
10611061
cls._static_immutable_initial_values[name] = None
10621062
elif (
1063-
type(trait) == Dict
1063+
isinstance(trait, Instance)
10641064
and trait.default_args is None
10651065
and trait.default_kwargs is None
10661066
and trait.allow_none

0 commit comments

Comments
 (0)