Skip to content

Commit 963fef1

Browse files
authored
Merge pull request #3600 from pygame-community/ankith26-deprecated-bytestring
Remove usage of deprecated `ByteString`
2 parents f17f602 + 44e97c5 commit 963fef1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

buildconfig/stubs/pygame/scrap.pyi

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
from collections.abc import ByteString
21
from typing import Optional
32

4-
from typing_extensions import deprecated # added in 3.13
3+
from typing_extensions import (
4+
Buffer, # added in 3.12,
5+
deprecated, # added in 3.13
6+
)
57

68
@deprecated("since 2.2.0. Use the new API instead, which only requires display init")
79
def init() -> None: ...
@@ -12,7 +14,7 @@ def get(data_type: str, /) -> Optional[bytes]: ...
1214
@deprecated("since 2.2.0. Use the new API instead, which only supports strings")
1315
def get_types() -> list[str]: ...
1416
@deprecated("since 2.2.0. Use the new API instead: `pygame.scrap.put_text`")
15-
def put(data_type: str, data: ByteString, /) -> None: ...
17+
def put(data_type: str, data: Buffer, /) -> None: ...
1618
@deprecated("since 2.2.0. Use the new API instead: `pygame.scrap.has_text`")
1719
def contains(data_type: str, /) -> bool: ...
1820
@deprecated("since 2.2.0. Use the new API instead, which uses system clipboard")

0 commit comments

Comments
 (0)