mirror of
https://github.com/progval/irctest.git
synced 2025-04-08 00:09:46 +00:00
Minor readability improvement
This commit is contained in:
@ -539,13 +539,10 @@ class BaseServerTestCase(
|
|||||||
if self.run_services:
|
if self.run_services:
|
||||||
self.controller.wait_for_services()
|
self.controller.wait_for_services()
|
||||||
if not name:
|
if not name:
|
||||||
new_name: int = (
|
used_ids: List[int] = [
|
||||||
max(
|
int(name) for name in self.clients if isinstance(name, (int, str))
|
||||||
[int(name) for name in self.clients if isinstance(name, (int, str))]
|
]
|
||||||
+ [0]
|
new_name = max(used_ids + [0]) + 1
|
||||||
)
|
|
||||||
+ 1
|
|
||||||
)
|
|
||||||
name = cast(TClientName, new_name)
|
name = cast(TClientName, new_name)
|
||||||
show_io = show_io if show_io is not None else self.show_io
|
show_io = show_io if show_io is not None else self.show_io
|
||||||
self.clients[name] = client_mock.ClientMock(name=name, show_io=show_io)
|
self.clients[name] = client_mock.ClientMock(name=name, show_io=show_io)
|
||||||
|
Reference in New Issue
Block a user