Skip to content

Commit

Permalink
Fix some flag cases (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser authored Aug 30, 2023
1 parent 8945799 commit d50b51a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backrefs/__meta__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,5 @@ def parse_version(ver: str) -> Version:
return Version(major, minor, micro, release, pre, post, dev)


__version_info__ = Version(5, 5, 0, "final")
__version_info__ = Version(5, 5, 1, "final")
__version__ = __version_info__._get_canonical()
2 changes: 0 additions & 2 deletions backrefs/bregex.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,6 @@ def subf(
) -> AnyStr:
"""Wrapper for `subf`."""

flags = args[4] if len(args) > 4 else kwargs.get('flags', 0)
is_replace = _is_replace(repl)
is_string = isinstance(repl, (str, bytes))
if is_replace and not cast(ReplaceTemplate[AnyStr], repl).use_format:
Expand Down Expand Up @@ -668,7 +667,6 @@ def split(
) -> list[AnyStr]:
"""Wrapper for `split`."""

flags = args[3] if len(args) > 3 else kwargs.get('flags', 0)
return cast(
'list[AnyStr]',
_regex.split(_apply_search_backrefs(pattern, flags), string, maxsplit, flags, *args, **kwargs)
Expand Down
4 changes: 4 additions & 0 deletions docs/src/markdown/about/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 5.5.1

- **FIX**: Fix some flag issues in `bregex`.

## 5.5

- **NEW**: `\e` and `\h` have both been deprecated in 6.0. Please migrate to using `\x1b` and `\p{Horiz_Space}` in
Expand Down

0 comments on commit d50b51a

Please sign in to comment.