13
13
The full API for :any:`Presentation` helper functions is given below.
14
14
"""
15
15
16
- from typing import List , Any as _Any
16
+ from typing import List , Any as _Any , Union
17
17
from typing_extensions import Self
18
18
19
19
from _libsemigroups_pybind11 import (
@@ -147,12 +147,12 @@ def __init__(self: Self, *args, **kwargs):
147
147
148
148
@_copydoc (_PresentationWords .rules )
149
149
@property
150
- def rules (self : Self ) -> List [List [int ] | str ]:
150
+ def rules (self : Self ) -> List [Union [ List [int ], str ] ]:
151
151
# pylint: disable=missing-function-docstring
152
152
return _to_cxx (self ).rules
153
153
154
154
@rules .setter
155
- def rules (self : Self , val : List [List [int ] | str ]) -> None :
155
+ def rules (self : Self , val : List [Union [ List [int ], str ] ]) -> None :
156
156
_to_cxx (self ).rules = val
157
157
158
158
@@ -172,7 +172,7 @@ class InversePresentation(Presentation):
172
172
_py_template_params_to_cxx_type = {
173
173
(List [int ],): _InversePresentationWords ,
174
174
(str ,): _InversePresentationStrings ,
175
- (Presentation ,): _InversePresentationWords | _InversePresentationStrings ,
175
+ (Presentation ,): Union [ _InversePresentationWords , _InversePresentationStrings ] ,
176
176
}
177
177
178
178
_cxx_type_to_py_template_params = dict (
0 commit comments