Skip to content

Commit

Permalink
Add __slots__ to multi callables
Browse files Browse the repository at this point in the history
  • Loading branch information
XuanWang-Amos committed Jan 3, 2024
1 parent b023ae1 commit 0f655a5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/python/grpcio/grpc/_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,9 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable):
_response_deserializer: Optional[DeserializingFunction]
_context: Any

__slots__ = ["_channel", "_managed_call", "_method", "_target",
"_request_serializer", "_response_deserializer", "_context"]

# pylint: disable=too-many-arguments
def __init__(
self,
Expand Down Expand Up @@ -1225,6 +1228,9 @@ class _SingleThreadedUnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
_response_deserializer: Optional[DeserializingFunction]
_context: Any

__slots__ = ["_channel", "_method", "_target",
"_request_serializer", "_response_deserializer", "_context"]

# pylint: disable=too-many-arguments
def __init__(
self,
Expand Down Expand Up @@ -1313,6 +1319,9 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
_response_deserializer: Optional[DeserializingFunction]
_context: Any

__slots__ = ["_channel", "_managed_call", "_method", "_target",
"_request_serializer", "_response_deserializer", "_context"]

# pylint: disable=too-many-arguments
def __init__(
self,
Expand Down Expand Up @@ -1394,6 +1403,9 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
_response_deserializer: Optional[DeserializingFunction]
_context: Any

__slots__ = ["_channel", "_managed_call", "_method", "_target",
"_request_serializer", "_response_deserializer", "_context"]

# pylint: disable=too-many-arguments
def __init__(
self,
Expand Down Expand Up @@ -1555,6 +1567,9 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable):
_response_deserializer: Optional[DeserializingFunction]
_context: Any

__slots__ = ["_channel", "_managed_call", "_method", "_target",
"_request_serializer", "_response_deserializer", "_context"]

# pylint: disable=too-many-arguments
def __init__(
self,
Expand Down

0 comments on commit 0f655a5

Please sign in to comment.