Skip to content

Commit ed71f09

Browse files
committed
DOC: add missing white space
And more appeasing the linter
1 parent 6de5db4 commit ed71f09

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/bluesky/callbacks/zmq.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,32 @@
2323

2424
def _normalize_address(inp: Union[str, tuple, int]):
2525
if isinstance(inp, str):
26-
if '://' in inp:
27-
protocol, _, rest_str = inp.partition('://')
26+
if "://" in inp:
27+
protocol, _, rest_str = inp.partition("://")
2828
else:
29-
protocol = 'tcp'
29+
protocol = "tcp"
3030
rest_str = inp
3131
elif isinstance(inp, tuple):
32-
if inp[0] in ['tcp', 'ipc']:
32+
if inp[0] in ["tcp", "ipc"]:
3333
protocol, *rest = inp
3434
else:
35-
protocol = 'tcp'
35+
protocol = "tcp"
3636
rest = list(inp)
37-
if protocol == 'tcp':
37+
if protocol == "tcp":
3838
if len(rest) == 2:
39-
rest_str = ':'.join(str(r) for r in rest)
39+
rest_str = ":".join(str(r) for r in rest)
4040
else:
41-
rest_str, = rest
41+
(rest_str,) = rest
4242
else:
43-
rest_str, = rest
43+
(rest_str,) = rest
4444
elif isinstance(inp, int):
45-
protocol = 'tcp'
46-
rest_str = f'localhost:{inp}'
45+
protocol = "tcp"
46+
rest_str = f"localhost:{inp}"
4747

4848
else:
4949
raise TypeError(f"Input expected to be str or tuple, not {type(inp)}")
5050

51-
return f'{protocol}://{rest_str}'
51+
return f"{protocol}://{rest_str}"
5252

5353

5454
class Bluesky0MQDecodeError(Exception):
@@ -145,6 +145,7 @@ class Proxy:
145145
- ``6657`` (implicitly binds to ``'tcp://localhost:6657'``
146146
- ``('tcp', 'localhost', 6657)``
147147
- ``('localhost', 6657)``
148+
148149
Parameters
149150
----------
150151
in_address : str or tuple or int, optional

0 commit comments

Comments
 (0)