Skip to content

Commit 91f586f

Browse files
committed
Apply black formatting
1 parent 33fb83f commit 91f586f

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

betterproto/__init__.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1015,10 +1015,10 @@ class ServiceStub(ABC):
10151015

10161016
def __init__(
10171017
self,
1018-
channel: 'Channel',
1018+
channel: "Channel",
10191019
*,
10201020
timeout: Optional[float] = None,
1021-
deadline: Optional['Deadline'] = None,
1021+
deadline: Optional["Deadline"] = None,
10221022
metadata: Optional[_MetadataLike] = None,
10231023
) -> None:
10241024
self.channel = channel
@@ -1029,7 +1029,7 @@ def __init__(
10291029
def __resolve_request_kwargs(
10301030
self,
10311031
timeout: Optional[float],
1032-
deadline: Optional['Deadline'],
1032+
deadline: Optional["Deadline"],
10331033
metadata: Optional[_MetadataLike],
10341034
):
10351035
return {
@@ -1045,7 +1045,7 @@ async def _unary_unary(
10451045
response_type: Type[T],
10461046
*,
10471047
timeout: Optional[float] = None,
1048-
deadline: Optional['Deadline'] = None,
1048+
deadline: Optional["Deadline"] = None,
10491049
metadata: Optional[_MetadataLike] = None,
10501050
) -> T:
10511051
"""Make a unary request and return the response."""
@@ -1068,7 +1068,7 @@ async def _unary_stream(
10681068
response_type: Type[T],
10691069
*,
10701070
timeout: Optional[float] = None,
1071-
deadline: Optional['Deadline'] = None,
1071+
deadline: Optional["Deadline"] = None,
10721072
metadata: Optional[_MetadataLike] = None,
10731073
) -> AsyncGenerator[T, None]:
10741074
"""Make a unary request and return the stream response iterator."""

betterproto/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def get_py_zero(type_num: int) -> str:
122122

123123

124124
def traverse(proto_file):
125-
def _traverse(path, items, prefix = ''):
125+
def _traverse(path, items, prefix=""):
126126
for i, item in enumerate(items):
127127
# Adjust the name since we flatten the heirarchy.
128128
item.name = next_prefix = prefix + item.name

betterproto/tests/test_features.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class TestParentMessage(betterproto.Message):
256256
some_double: float = betterproto.double_field(2)
257257
some_message: TestChildMessage = betterproto.message_field(3)
258258

259-
test = TestParentMessage().from_dict({"someInt": 0, "someDouble": 1.2,})
259+
test = TestParentMessage().from_dict({"someInt": 0, "someDouble": 1.2})
260260

261261
assert test.to_dict(include_default_values=True) == {
262262
"someInt": 0,

betterproto/tests/test_service_stub.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
2929
grpclib.const.Cardinality.UNARY_UNARY,
3030
DoThingRequest,
3131
DoThingResponse,
32-
),
32+
)
3333
}
3434

3535

@@ -94,7 +94,9 @@ async def test_service_call_lower_level_with_overrides():
9494
) as channel:
9595
stub = ExampleServiceStub(channel, deadline=deadline, metadata=metadata)
9696
response = await stub._unary_unary(
97-
"/service.ExampleService/DoThing", DoThingRequest(ITERATIONS), DoThingResponse,
97+
"/service.ExampleService/DoThing",
98+
DoThingRequest(ITERATIONS),
99+
DoThingResponse,
98100
deadline=kwarg_deadline,
99101
metadata=kwarg_metadata,
100102
)
@@ -116,7 +118,9 @@ async def test_service_call_lower_level_with_overrides():
116118
) as channel:
117119
stub = ExampleServiceStub(channel, deadline=deadline, metadata=metadata)
118120
response = await stub._unary_unary(
119-
"/service.ExampleService/DoThing", DoThingRequest(ITERATIONS), DoThingResponse,
121+
"/service.ExampleService/DoThing",
122+
DoThingRequest(ITERATIONS),
123+
DoThingResponse,
120124
timeout=kwarg_timeout,
121125
metadata=kwarg_metadata,
122126
)

0 commit comments

Comments
 (0)