Tidy proto-guard `ValueError` fmt in `open_root_actor()`
Pre-compute `mismatch_lines` str instead of `+`-concat inside the f-string raise site; slightly easier to read and avoids the `+ '\n\n'` continuation. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codesubint_forkserver_backend
parent
255c9c3a7c
commit
5cd06810db
|
|
@ -384,16 +384,17 @@ async def open_root_actor(
|
|||
if addr.proto_key not in enable_transports
|
||||
]
|
||||
if bad_addrs:
|
||||
mismatch_lines: str = '\n'.join(
|
||||
f' - proto_key={pk!r} addr={a!r}'
|
||||
for pk, a in bad_addrs
|
||||
)
|
||||
raise ValueError(
|
||||
f'`registry_addrs` contains addr(s) whose proto is '
|
||||
f'not in `enable_transports`!\n'
|
||||
f'enable_transports: {enable_transports!r}\n'
|
||||
f'mismatched_addrs:\n'
|
||||
+ '\n'.join(
|
||||
f' - proto_key={pk!r} addr={a!r}'
|
||||
for pk, a in bad_addrs
|
||||
)
|
||||
+ '\n\n'
|
||||
f'{mismatch_lines}\n'
|
||||
f'\n'
|
||||
f'Either add the missing proto to '
|
||||
f'`enable_transports`, or remove the addr from '
|
||||
f'`registry_addrs`.'
|
||||
|
|
|
|||
Loading…
Reference in New Issue