Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit29f78dd

Browse files
Amend annotation forasyncio.Protocol.__slots__ (#14980)
1 parent546dd28 commit29f78dd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎stdlib/asyncio/protocols.pyi‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class BaseProtocol:
1414

1515
classProtocol(BaseProtocol):
1616
# Need annotation or mypy will complain about 'Cannot determine type of "__slots__" in base class'
17-
__slots__:tuple[()]= ()
17+
__slots__:tuple[str, ...]= ()
1818
defdata_received(self,data:bytes)->None: ...
1919
defeof_received(self)->bool|None: ...
2020

@@ -35,7 +35,7 @@ class DatagramProtocol(BaseProtocol):
3535
deferror_received(self,exc:Exception)->None: ...
3636

3737
classSubprocessProtocol(BaseProtocol):
38-
__slots__:tuple[()]= ()
38+
__slots__:tuple[str, ...]= ()
3939
defpipe_data_received(self,fd:int,data:bytes)->None: ...
4040
defpipe_connection_lost(self,fd:int,exc:Exception|None)->None: ...
4141
defprocess_exited(self)->None: ...

‎stubs/protobuf/google/protobuf/internal/well_known_types.pyi‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ _StructValue: TypeAlias = struct_pb2.Struct | struct_pb2.ListValue | str | float
6767
_StructValueArg:TypeAlias=_StructValue|Mapping[str,_StructValueArg]|Sequence[_StructValueArg]
6868

6969
classStruct:
70-
__slots__:tuple[()]= ()
70+
__slots__:tuple[str, ...]= ()
7171
def__getitem__(self,key:str)->_StructValue: ...
7272
def__setitem__(self,key:str,value:_StructValueArg)->None: ...
7373
def__delitem__(self,key:str)->None: ...
@@ -81,7 +81,7 @@ class Struct:
8181
defupdate(self,dictionary:SupportsItems[str,_StructValueArg])->None: ...
8282

8383
classListValue:
84-
__slots__:tuple[()]= ()
84+
__slots__:tuple[str, ...]= ()
8585
def__len__(self)->int: ...
8686
defappend(self,value:_StructValue)->None: ...
8787
defextend(self,elem_seq:Iterable[_StructValue])->None: ...

‎stubs/protobuf/google/protobuf/message.pyi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class DecodeError(Error): ...
1212
classEncodeError(Error): ...
1313

1414
classMessage:
15-
__slots__:tuple[()]= ()
15+
__slots__:tuple[str, ...]= ()
1616
DESCRIPTOR:Descriptor|_upb_Descriptor
1717
def__deepcopy__(self,memo:Any=None)->Self: ...
1818
def__eq__(self,other_msg): ...

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp