Skip to content

Commit

Permalink
regex: functions do not accept any buffer for pattern (#11899)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdanal committed May 11, 2024
1 parent 7bfde5b commit 6565e8a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions stubs/regex/regex/regex.pyi
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

0 comments on commit 6565e8a

Please sign in to comment.