Skip to content

Commit a84fe85

Browse files
committed
Replace | with Union.
1 parent 01532f6 commit a84fe85

File tree

1 file changed

+2
-2
lines changed
  • python/selfie-lib/selfie_lib

1 file changed

+2
-2
lines changed

python/selfie-lib/selfie_lib/Lens.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import re
22
from abc import ABC, abstractmethod
3-
from typing import Callable, Generic, Iterator, List, Optional, Protocol, TypeVar
3+
from typing import Callable, Generic, Iterator, List, Optional, Protocol, TypeVar, Union
44

55
from .Snapshot import Snapshot, SnapshotValue
66

@@ -44,7 +44,7 @@ def replace_all(self, toReplace: str, replacement: str) -> "CompoundLens":
4444
return self.mutate_all_facets(lambda s: s.replace(toReplace, replacement))
4545

4646
def replace_all_regex(
47-
self, pattern: str | re.Pattern[str], replacement: str
47+
self, pattern: Union[str, re.Pattern[str]], replacement: str
4848
) -> "CompoundLens":
4949
return self.mutate_all_facets(lambda s: re.sub(pattern, replacement, s))
5050

0 commit comments

Comments
 (0)