Skip to content

Commit 6565e8a

Browse files
authored
regex: functions do not accept any buffer for pattern (#11899)
1 parent 7bfde5b commit 6565e8a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

stubs/regex/regex/regex.pyi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def split(
112112
) -> list[str | Any]: ...
113113
@overload
114114
def split(
115-
pattern: ReadableBuffer | Pattern[bytes],
115+
pattern: bytes | Pattern[bytes],
116116
string: ReadableBuffer,
117117
maxsplit: int = 0,
118118
flags: int = 0,
@@ -134,7 +134,7 @@ def splititer(
134134
) -> _regex.Splitter[str]: ...
135135
@overload
136136
def splititer(
137-
pattern: ReadableBuffer | Pattern[bytes],
137+
pattern: bytes | Pattern[bytes],
138138
string: ReadableBuffer,
139139
maxsplit: int = 0,
140140
flags: int = 0,
@@ -158,7 +158,7 @@ def findall(
158158
) -> list[Any]: ...
159159
@overload
160160
def findall(
161-
pattern: ReadableBuffer | Pattern[bytes],
161+
pattern: bytes | Pattern[bytes],
162162
string: ReadableBuffer,
163163
flags: int = 0,
164164
pos: int | None = None,
@@ -185,7 +185,7 @@ def finditer(
185185
) -> _regex.Scanner[str]: ...
186186
@overload
187187
def finditer(
188-
pattern: ReadableBuffer | Pattern[bytes],
188+
pattern: bytes | Pattern[bytes],
189189
string: ReadableBuffer,
190190
flags: int = 0,
191191
pos: int | None = None,
@@ -213,7 +213,7 @@ def sub(
213213
) -> str: ...
214214
@overload
215215
def sub(
216-
pattern: ReadableBuffer | Pattern[bytes],
216+
pattern: bytes | Pattern[bytes],
217217
repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
218218
string: ReadableBuffer,
219219
count: int = 0,
@@ -241,7 +241,7 @@ def subf(
241241
) -> str: ...
242242
@overload
243243
def subf(
244-
pattern: ReadableBuffer | Pattern[bytes],
244+
pattern: bytes | Pattern[bytes],
245245
format: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
246246
string: ReadableBuffer,
247247
count: int = 0,
@@ -269,7 +269,7 @@ def subn(
269269
) -> tuple[str, int]: ...
270270
@overload
271271
def subn(
272-
pattern: ReadableBuffer | Pattern[bytes],
272+
pattern: bytes | Pattern[bytes],
273273
repl: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
274274
string: ReadableBuffer,
275275
count: int = 0,
@@ -297,7 +297,7 @@ def subfn(
297297
) -> tuple[str, int]: ...
298298
@overload
299299
def subfn(
300-
pattern: ReadableBuffer | Pattern[bytes],
300+
pattern: bytes | Pattern[bytes],
301301
format: ReadableBuffer | Callable[[Match[bytes]], ReadableBuffer],
302302
string: ReadableBuffer,
303303
count: int = 0,

0 commit comments

Comments
 (0)