We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ec2431 commit 3b08e8cCopy full SHA for 3b08e8c
machine/punctuation_analysis/text_segment.py
@@ -123,14 +123,14 @@ def __getitem__(self, key) -> "GraphemeString":
123
else:
124
raise TypeError("Indices must be integers or slices")
125
126
- def _normalize_start_index(self, index: int | None) -> int:
+ def _normalize_start_index(self, index: Optional[int]) -> int:
127
if index is None:
128
return 0
129
if index < 0:
130
return len(self) + index
131
return index
132
133
- def _normalize_stop_index(self, index: int | None) -> int:
+ def _normalize_stop_index(self, index: Optional[int]) -> int:
134
135
return len(self)
136
0 commit comments