Skip to content

Commit 340eb12

Browse files
unicodedata: accepts ReadOnlyBuffer (#9106)
1 parent 1d4eed1 commit 340eb12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stdlib/unicodedata.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import sys
2+
from _typeshed import ReadOnlyBuffer
23
from typing import Any, TypeVar
34
from typing_extensions import final
45

@@ -21,7 +22,7 @@ def east_asian_width(__chr: str) -> str: ...
2122
if sys.version_info >= (3, 8):
2223
def is_normalized(__form: str, __unistr: str) -> bool: ...
2324

24-
def lookup(__name: str | bytes) -> str: ...
25+
def lookup(__name: str | ReadOnlyBuffer) -> str: ...
2526
def mirrored(__chr: str) -> int: ...
2627
def name(__chr: str, __default: _T = ...) -> str | _T: ...
2728
def normalize(__form: str, __unistr: str) -> str: ...
@@ -41,7 +42,7 @@ class UCD:
4142
if sys.version_info >= (3, 8):
4243
def is_normalized(self, __form: str, __unistr: str) -> bool: ...
4344

44-
def lookup(self, __name: str | bytes) -> str: ...
45+
def lookup(self, __name: str | ReadOnlyBuffer) -> str: ...
4546
def mirrored(self, __chr: str) -> int: ...
4647
def name(self, __chr: str, __default: _T = ...) -> str | _T: ...
4748
def normalize(self, __form: str, __unistr: str) -> str: ...

0 commit comments

Comments
 (0)