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

This commit is contained in:
Shantanu
2024-03-10 06:11:43 -07:00
committed by GitHub
parent f94bbfbcc4
commit 88fa182253
97 changed files with 625 additions and 632 deletions

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: ...