Skip to content

Commit

Permalink
Fix 3.8 version
Browse files Browse the repository at this point in the history
  • Loading branch information
tolstislon committed Jul 26, 2024
1 parent a3695c8 commit 84a7344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion string_gen/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def __bool__(self) -> bool:
def __or__(self, other: "StringGen") -> "StringGen":
base = _get_bytes(self._pattern.pattern)
other = _get_bytes(self.__get_value(other).pattern)
return StringGen(base.removesuffix(b"^") + other.removeprefix(b"$"))
return StringGen(base.rstrip(b"^") + other.lstrip(b"$"))

def __repr__(self) -> str:
return f"{type(self).__name__}({self._pattern.pattern!r})"
Expand Down

0 comments on commit 84a7344

Please sign in to comment.