@@ -20,7 +20,8 @@ def __init__(self, **kwargs):
2020 """
2121 self .__dict__ .update (kwargs )
2222 self .option_names = list (kwargs .keys ())
23- self .long_to_short_dct = {n : self .short_names [i ] for i , n in enumerate (self .option_names )}
23+ # short_names is defined in subclasses
24+ self .long_to_short_dct = {n : self .short_names [i ] for i , n in enumerate (self .option_names )} # type: ignore
2425 self .short_to_long_dct = {v : k for k , v in self .long_to_short_dct .items ()}
2526 self .num_option = len (self .option_names )
2627
@@ -42,7 +43,7 @@ def __eq__(self, other)->bool:
4243 def __repr__ (self )-> str :
4344 return str (self .__class__ ) + ": " + ', ' .join (self .getTrueNames ())
4445
45- def getTrueNames (self )-> list [str ]:
46+ def getTrueNames (self )-> List [str ]:
4647 results :list = []
4748 for i , key in enumerate (self .option_names ):
4849 if self .__dict__ [key ]:
@@ -122,7 +123,7 @@ def iterator(self):
122123 Iteratively returns an OptionCollection of the same type with all combinations of
123124 values for the boolean attributes.
124125 """
125- name_collections = util .getAllSubsets (self .short_names )
126+ name_collections = util .getAllSubsets (self .short_names ) # type: ignore
126127 for name_collection in name_collections :
127128 yield self .makeOptionFromShortNames (name_collection )
128129
0 commit comments