File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -129,11 +129,11 @@ function signatures and return types in all cases:
129129 ... def example (instance ) -> str :
130130 ... return ' default'
131131 ...
132- >> > @ example.register
132+ >> > @ example.register( int )
133133 ... def _example_int (instance : int , other : int ) -> int :
134134 ... return instance + other
135135 ...
136- >> > @ example.register
136+ >> > @ example.register( str )
137137 ... def _example_str (instance : str ) -> bool :
138138 ... return bool (instance)
139139 ...
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ So, this would not work:
8282 ...
8383 Traceback (most recent call last):
8484 ...
85- TypeError : Subscripted generics cannot be used with class and instance checks
85+ TypeError : ...
8686
8787
8888 But, this will (note that we use ``list `` inside ``.instance() `` call):
You can’t perform that action at this time.
0 commit comments