Skip to content

Commit 782fb61

Browse files
committed
fix: still using py3.10 union type
1 parent 30b69fa commit 782fb61

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/ape/managers/query.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
class _RpcCursor(BaseCursorAPI):
5353
def shrink(
5454
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,
5757
) -> "Self":
5858
copy = self.model_copy(deep=True)
5959

@@ -102,8 +102,8 @@ class _RpcBlockTransactionCursor(_RpcCursor):
102102
# TODO: Move to default implementation in `BaseCursorAPI`? (remove `@abstractmethod`)
103103
def shrink(
104104
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,
107107
) -> "Self":
108108
if (start_index and start_index != 0) or (
109109
end_index and end_index != self.query.num_transactions
@@ -142,8 +142,8 @@ class _RpcAccountTransactionCursor(_RpcCursor):
142142

143143
def shrink(
144144
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,
147147
) -> "Self":
148148
copy = self.model_copy(deep=True)
149149

@@ -299,7 +299,11 @@ def validate_coverage(self):
299299
return self
300300

301301
# 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":
303307
raise NotImplementedError
304308

305309
@property

0 commit comments

Comments
 (0)