mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-16 02:51:28 +08:00
Buffer support for re (#7679)
This commit is contained in:
1 parent
5dad506bf2
commit
02e0c98d62
3 files changed
+86
-48
No files matched your search
@@ -0,0 +1,8 @@
|
||||
from typing import Match, Optional, Pattern
|
||||
from typing_extensions import assert_type
|
||||
|
||||
|
||||
def test_search(str_pat: Pattern[str], bytes_pat: Pattern[bytes]) -> None:
|
||||
assert_type(str_pat.search("x"), Optional[Match[str]])
|
||||
assert_type(bytes_pat.search(b"x"), Optional[Match[bytes]])
|
||||
assert_type(bytes_pat.search(bytearray(b"x")), Optional[Match[bytes]])
|
||||
Reference in new issue
Block a user