Skip to content

regex: functions do not accept any buffer for pattern #11899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions stubs/regex/regex/regex.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def split(
) -> list[str | Any]: ...
@overload
def split(
pattern: ReadableBuffer | Pattern[bytes],
pattern: bytes | Pattern[bytes],
string: ReadableBuffer,
maxsplit: int = 0,
flags: int = 0,
Expand All @@ -134,7 +134,7 @@ def splititer(
) -> _regex.Splitter[str]: ...
@overload
def splititer(
pattern: ReadableBuffer | Pattern[bytes],
pattern: bytes | Pattern[bytes],
string: ReadableBuffer,
maxsplit: int = 0,
flags: int = 0,
Expand All @@ -158,7 +158,7 @@ def findall(
) -> list[Any]: ...
@overload
def findall(
pattern: ReadableBuffer | Pattern[bytes],
pattern: bytes | Pattern[bytes],
string: ReadableBuffer,
flags: int = 0,
pos: int | None = None,
Expand All @@ -185,7 +185,7 @@ def finditer(
) -> _regex.Scanner[str]: ...
@overload
def finditer(
pattern: ReadableBuffer | Pattern[bytes],
pattern: bytes | Pattern[bytes],
string: ReadableBuffer,
flags: int = 0,
pos: int | None = None,
Expand Down Expand Up @@ -213,7 +213,7 @@ def sub(
) -> str: ...
@overload
def sub(
pattern: ReadableBuffer | Pattern[bytes],
pattern: bytes | Pattern[bytes],
repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
string: ReadableBuffer,
count: int = 0,
Expand Down Expand Up @@ -241,7 +241,7 @@ def subf(
) -> str: ...
@overload
def subf(
pattern: ReadableBuffer | Pattern[bytes],
pattern: bytes | Pattern[bytes],
format: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
string: ReadableBuffer,
count: int = 0,
Expand Down Expand Up @@ -269,7 +269,7 @@ def subn(
) -> tuple[str, int]: ...
@overload
def subn(
pattern: ReadableBuffer | Pattern[bytes],
pattern: bytes | Pattern[bytes],
repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
string: ReadableBuffer,
count: int = 0,
Expand Down Expand Up @@ -297,7 +297,7 @@ def subfn(
) -> tuple[str, int]: ...
@overload
def subfn(
pattern: ReadableBuffer | Pattern[bytes],
pattern: bytes | Pattern[bytes],
format: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
string: ReadableBuffer,
count: int = 0,
Expand Down