|
52 | 52 | class _RpcCursor(BaseCursorAPI): |
53 | 53 | def shrink( |
54 | 54 | self, |
55 | | - start_index: int | None = None, |
56 | | - end_index: int | None = None, |
| 55 | + start_index: Optional[int] = None, |
| 56 | + end_index: Optional[int] = None, |
57 | 57 | ) -> "Self": |
58 | 58 | copy = self.model_copy(deep=True) |
59 | 59 |
|
@@ -102,8 +102,8 @@ class _RpcBlockTransactionCursor(_RpcCursor): |
102 | 102 | # TODO: Move to default implementation in `BaseCursorAPI`? (remove `@abstractmethod`) |
103 | 103 | def shrink( |
104 | 104 | self, |
105 | | - start_index: int | None = None, |
106 | | - end_index: int | None = None, |
| 105 | + start_index: Optional[int] = None, |
| 106 | + end_index: Optional[int] = None, |
107 | 107 | ) -> "Self": |
108 | 108 | if (start_index and start_index != 0) or ( |
109 | 109 | end_index and end_index != self.query.num_transactions |
@@ -142,8 +142,8 @@ class _RpcAccountTransactionCursor(_RpcCursor): |
142 | 142 |
|
143 | 143 | def shrink( |
144 | 144 | self, |
145 | | - start_index: int | None = None, |
146 | | - end_index: int | None = None, |
| 145 | + start_index: Optional[int] = None, |
| 146 | + end_index: Optional[int] = None, |
147 | 147 | ) -> "Self": |
148 | 148 | copy = self.model_copy(deep=True) |
149 | 149 |
|
@@ -299,7 +299,11 @@ def validate_coverage(self): |
299 | 299 | return self |
300 | 300 |
|
301 | 301 | # TODO: Move to `BaseCursorAPI` and don't have `@abstractmethod`? |
302 | | - def shrink(self, start_index: int | None = None, end_index: int | None = None) -> "Self": |
| 302 | + def shrink( |
| 303 | + self, |
| 304 | + start_index: Optional[int] = None, |
| 305 | + end_index: Optional[int] = None, |
| 306 | + ) -> "Self": |
303 | 307 | raise NotImplementedError |
304 | 308 |
|
305 | 309 | @property |
|
0 commit comments