Skip to content

Commit 57664cf

Browse files
Fix type hint for python 3.9
1 parent 531109a commit 57664cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libsemigroups_pybind11/transf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import abc
1717

18-
from typing import Any as _Any, List
18+
from typing import Any as _Any, List, Union
1919
from typing_extensions import Self
2020

2121
from _libsemigroups_pybind11 import ( # pylint: disable=no-name-in-module
@@ -84,7 +84,7 @@ def _cxx_type_change_required(self: Self, n: int) -> bool:
8484
assert n <= 2**32
8585
return n > self.py_template_params[0]
8686

87-
def __getitem__(self: Self, i: int) -> int | _Undefined:
87+
def __getitem__(self: Self, i: int) -> Union[int, _Undefined]:
8888
return _to_cxx(self)[i]
8989

9090
def __hash__(self: Self) -> int:

0 commit comments

Comments
 (0)