7171
7272def change_dict (* ordered_values ):
7373 change_names = ("name" , "old" , "new" , "owner" , "type" )
74- return dict (zip (change_names , ordered_values ))
74+ return dict (zip (change_names , ordered_values , strict = True ))
7575
7676
7777# -----------------------------------------------------------------------------
@@ -1666,7 +1666,7 @@ class ListTrait(HasTraits):
16661666class TestList (TraitTestBase ):
16671667 obj = ListTrait ()
16681668
1669- _default_value : t . List [t .Any ] = []
1669+ _default_value : list [t .Any ] = []
16701670 _good_values = [[], [1 ], list (range (10 )), (1 , 2 )]
16711671 _bad_values = [10 , [1 , "a" ], "a" ]
16721672
@@ -1683,7 +1683,7 @@ class SetTrait(HasTraits):
16831683class TestSet (TraitTestBase ):
16841684 obj = SetTrait ()
16851685
1686- _default_value : t . Set [str ] = set ()
1686+ _default_value : set [str ] = set ()
16871687 _good_values = [{"a" , "b" }, "ab" ]
16881688 _bad_values = [1 ]
16891689
@@ -1705,7 +1705,7 @@ class NoneInstanceListTrait(HasTraits):
17051705class TestNoneInstanceList (TraitTestBase ):
17061706 obj = NoneInstanceListTrait ()
17071707
1708- _default_value : t . List [t .Any ] = []
1708+ _default_value : list [t .Any ] = []
17091709 _good_values = [[Foo (), Foo ()], []]
17101710 _bad_values = [[None ], [Foo (), None ]]
17111711
@@ -1721,7 +1721,7 @@ def test_klass(self):
17211721 """Test that the instance klass is properly assigned."""
17221722 self .assertIs (self .obj .traits ()["value" ]._trait .klass , Foo )
17231723
1724- _default_value : t . List [t .Any ] = []
1724+ _default_value : list [t .Any ] = []
17251725 _good_values = [[Foo (), Foo ()], []]
17261726 _bad_values = [
17271727 [
@@ -1741,7 +1741,7 @@ class UnionListTrait(HasTraits):
17411741class TestUnionListTrait (TraitTestBase ):
17421742 obj = UnionListTrait ()
17431743
1744- _default_value : t . List [t .Any ] = []
1744+ _default_value : list [t .Any ] = []
17451745 _good_values = [[True , 1 ], [False , True ]]
17461746 _bad_values = [[1 , "True" ], False ]
17471747
@@ -1897,7 +1897,7 @@ class DictTrait(HasTraits):
18971897
18981898
18991899def test_dict_assignment ():
1900- d : t . Dict [str , int ] = {}
1900+ d : dict [str , int ] = {}
19011901 c = DictTrait ()
19021902 c .value = d
19031903 d ["a" ] = 5
@@ -2520,7 +2520,7 @@ def test_klass(self):
25202520 """Test that the instance klass is properly assigned."""
25212521 self .assertIs (self .obj .traits ()["value" ]._trait .klass , ForwardDeclaredBar )
25222522
2523- _default_value : t . List [t .Any ] = []
2523+ _default_value : list [t .Any ] = []
25242524 _good_values = [
25252525 [ForwardDeclaredBar (), ForwardDeclaredBarSub ()],
25262526 [],
@@ -2543,7 +2543,7 @@ def test_klass(self):
25432543 """Test that the instance klass is properly assigned."""
25442544 self .assertIs (self .obj .traits ()["value" ]._trait .klass , ForwardDeclaredBar )
25452545
2546- _default_value : t . List [t .Any ] = []
2546+ _default_value : list [t .Any ] = []
25472547 _good_values = [
25482548 [ForwardDeclaredBar , ForwardDeclaredBarSub ],
25492549 [],
0 commit comments