File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,15 @@ def __init__(self, objects):
2020 self ._objects = objects
2121 self ._named_objects = {obj .name : obj for obj in objects }
2222
23- def __getitem__ (self , key ):
24- if isinstance (key , int ):
25- return self ._objects [key ]
26- elif isinstance (key , str ):
27- return self ._named_objects [key ]
28- else : # -nocov-
29- raise TypeError ("Huh?" )
23+ # leaving this commented out... it doesn't seem to be used currently,
24+ # but if it is needed in the future, this should be the implementation
25+ # def __getitem__(self, key):
26+ # if isinstance(key, int):
27+ # return self._objects[key]
28+ # elif isinstance(key, str):
29+ # return self._named_objects[key]
30+ # else: # -no-cov-
31+ # raise TypeError("Huh?")
3032
3133 def __iter__ (self ):
3234 return iter (self ._objects )
Original file line number Diff line number Diff line change @@ -15,16 +15,12 @@ class TestWizardParameter:
1515 def _reverse (string ):
1616 return "" .join (reversed (string ))
1717
18- @staticmethod
19- def _summarize (string ):
20- return f"Here's a summary: we made { string } "
21-
2218 def setup (self ):
2319 self .parameter = WizardParameter (
2420 name = 'foo' ,
2521 ask = "How should I {do_what}?" ,
2622 loader = self ._reverse ,
27- summarize = self . _summarize ,
23+ summarize = lambda string : f"Should be unused. Input: { string } " ,
2824 )
2925 self .wizard = mock_wizard (["bar" ])
3026 self .compiler_plugin = compiling .InstanceCompilerPlugin (
You can’t perform that action at this time.
0 commit comments