File tree 2 files changed +3
-3
lines changed
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:
129
129
... def example (instance ) -> str :
130
130
... return ' default'
131
131
...
132
- >> > @ example.register
132
+ >> > @ example.register( int )
133
133
... def _example_int (instance : int , other : int ) -> int :
134
134
... return instance + other
135
135
...
136
- >> > @ example.register
136
+ >> > @ example.register( str )
137
137
... def _example_str (instance : str ) -> bool :
138
138
... return bool (instance)
139
139
...
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ So, this would not work:
82
82
...
83
83
Traceback (most recent call last):
84
84
...
85
- TypeError : Subscripted generics cannot be used with class and instance checks
85
+ TypeError : ...
86
86
87
87
88
88
But, this will (note that we use ``list `` inside ``.instance() `` call):
You can’t perform that action at this time.
0 commit comments