Skip to content

Commit 14be3d7

Browse files
committed
Fixup lint errors
************* Module agent_streaming.test_infinite_tracing tests/agent_streaming/test_infinite_tracing.py:284:8: E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return) ************* Module testing_support.util tests/testing_support/util.py:39:7: R1714: Consider merging these comparisons with 'in' by using 'hostname in ('localhost', '127.0.0.1')'. Use a set instead if elements are hashable. (consider-using-in)
1 parent 062af31 commit 14be3d7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

tests/agent_streaming/test_infinite_tracing.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,8 @@ def condition(*args, **kwargs):
281281
_create_channel = StreamingRpc.create_channel
282282

283283
def create_channel(self, *args, **kwargs):
284-
ret = _create_channel(self, *args, **kwargs)
284+
_create_channel(self, *args, **kwargs)
285285
connect_event.set()
286-
return ret
287286

288287
monkeypatch.setattr(StreamingRpc, "condition", condition)
289288
monkeypatch.setattr(StreamingRpc, "create_channel", create_channel)

tests/testing_support/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def version2tuple(version_str):
3636

3737

3838
def instance_hostname(hostname):
39-
if hostname == "localhost" or hostname == "127.0.0.1":
39+
if hostname in ["localhost", "127.0.0.1"]:
4040
hostname = socket.gethostname()
4141
return hostname
4242

0 commit comments

Comments
 (0)