Use PEP 570 syntax in third party stubs (#11554)

This commit is contained in:
Shantanu authored and GitHub committed 2024-03-10 14:11:43 +01:00
1 parent f94bbfbcc4
commit 88fa182253
97 files changed
+625 -632

No files matched your search

+2 -2
View File
@@ -347,7 +347,7 @@ class Struct:
# Structs generate their attributes
# TODO: Create a specific type-only class for all instances of `Struct`
@type_check_only
def __getattr__(self, __name: str) -> Any: ...
def __getattr__(self, name: str, /) -> Any: ...
class TextElements8(ValueField):
string_textitem: Struct
@@ -365,7 +365,7 @@ class GetAttrData:
# GetAttrData classes get their attributes dynamically
# TODO: Complete all classes inheriting from GetAttrData
def __getattr__(self, attr: str) -> Any: ...
def __setattr__(self, __name: str, __value: Any) -> None: ...
def __setattr__(self, name: str, value: Any, /) -> None: ...
class DictWrapper(GetAttrData):
def __init__(self, dict: dict[str, Any]) -> None: ...