mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 13:21:11 +08:00
Use PEP 570 syntax in third party stubs (#11554)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user