Skip to content

Commit 15918a6

Browse files
Remove unnecessary type hints
1 parent e016dc7 commit 15918a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytensor/tensor/subtensor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def as_index_literal(
222222
return None
223223

224224
if isinstance(idx, ScalarConstant):
225-
return cast(int | None, idx.data)
225+
return cast(int, idx.data)
226226

227227
if isinstance(idx, TensorConstant):
228228
return cast(int, idx.data.item())
@@ -253,7 +253,7 @@ def get_canonical_form_slice(
253253
def get_canonical_form_slice(
254254
theslice: ScalarVariable | TensorVariable,
255255
length: int | np.integer | ScalarVariable | TensorVariable,
256-
) -> tuple[slice | ScalarVariable, int]: ...
256+
) -> tuple[ScalarVariable, int]: ...
257257

258258

259259
def get_canonical_form_slice(

0 commit comments

Comments
 (0)