Skip to content

Commit 4c82449

Browse files
committed
style: some code formatting
1 parent 0f1ba6e commit 4c82449

File tree

8 files changed

+32
-17
lines changed

8 files changed

+32
-17
lines changed

packages/core/src/robotcode/core/utils/dataclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def _as_dict_handle_unknown_type(value: Any, _remove_defaults: bool, _encode: bo
551551
(dataclasses.is_dataclass, _handle_dataclass),
552552
(lambda value: isinstance(value, enum.Enum), _as_dict_handle_enum),
553553
(
554-
lambda value: (isinstance(value, tuple) and hasattr(value, "_fields")),
554+
lambda value: isinstance(value, tuple) and hasattr(value, "_fields"),
555555
_as_dict_handle_named_tuple,
556556
),
557557
(

packages/debugger/src/robotcode/debugger/debugger.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,8 +839,10 @@ def wait_for_running(self) -> None:
839839
while True:
840840
with self.condition:
841841
self.condition.wait_for(
842-
lambda: self.state in [State.Running, State.Stopped, State.CallKeyword]
843-
or self.requested_state != RequestedState.Nothing
842+
lambda: (
843+
self.state in [State.Running, State.Stopped, State.CallKeyword]
844+
or self.requested_state != RequestedState.Nothing
845+
)
844846
)
845847

846848
if self.state == State.CallKeyword:

packages/jsonrpc2/src/robotcode/jsonrpc2/protocol.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,9 @@ def get_methods(obj: Any) -> Dict[str, RpcMethodEntry]:
277277
lambda m1: (m1, cast(RpcMethod, m1)),
278278
iter_methods(
279279
obj,
280-
lambda m2: isinstance(m2, RpcMethod)
281-
or (inspect.ismethod(m2) and isinstance(m2.__func__, RpcMethod)),
280+
lambda m2: (
281+
isinstance(m2, RpcMethod) or (inspect.ismethod(m2) and isinstance(m2.__func__, RpcMethod))
282+
),
282283
),
283284
)
284285
}

packages/robot/src/robotcode/robot/diagnostics/imports_manager.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,8 +1005,10 @@ def get_library_meta(
10051005
for p in self.ignored_libraries_patters
10061006
):
10071007
self._logger.debug(
1008-
lambda: f"Ignore library {result.name or '' if result is not None else ''}"
1009-
f" {result.origin or '' if result is not None else ''} for caching.",
1008+
lambda: (
1009+
f"Ignore library {result.name or '' if result is not None else ''}"
1010+
f" {result.origin or '' if result is not None else ''} for caching."
1011+
),
10101012
context_name="import",
10111013
)
10121014
return None, import_name, ignore_arguments
@@ -1075,8 +1077,10 @@ def get_variables_meta(
10751077
for p in self.ignored_variables_patters
10761078
):
10771079
self._logger.debug(
1078-
lambda: f"Ignore Variables {result.name or '' if result is not None else ''}"
1079-
f" {result.origin or '' if result is not None else ''} for caching."
1080+
lambda: (
1081+
f"Ignore Variables {result.name or '' if result is not None else ''}"
1082+
f" {result.origin or '' if result is not None else ''} for caching."
1083+
)
10801084
)
10811085
return None, import_name
10821086

packages/runner/src/robotcode/runner/cli/libdoc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ def libdoc(app: Application, robot_options_and_args: Tuple[str, ...]) -> None:
8989
options = libdoc_options.build_command_line()
9090

9191
app.verbose(
92-
lambda: "Executing libdoc robot with the following options:\n "
93-
+ " ".join(f'"{o}"' for o in (options + list(robot_options_and_args)))
92+
lambda: (
93+
"Executing libdoc robot with the following options:\n "
94+
+ " ".join(f'"{o}"' for o in (options + list(robot_options_and_args)))
95+
)
9496
)
9597

9698
app.exit(

packages/runner/src/robotcode/runner/cli/rebot.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ def rebot(app: Application, robot_options_and_args: Tuple[str, ...]) -> None:
9494
raise click.ClickException(str(e)) from e
9595

9696
app.verbose(
97-
lambda: "Executing rebot with the following options:\n "
98-
+ " ".join(f'"{o}"' for o in (options + list(robot_options_and_args)))
97+
lambda: (
98+
"Executing rebot with the following options:\n "
99+
+ " ".join(f'"{o}"' for o in (options + list(robot_options_and_args)))
100+
)
99101
)
100102

101103
console_links_args = []

packages/runner/src/robotcode/runner/cli/robot.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,10 @@ def handle_robot_options(
275275
cmd_options = profile.build_command_line()
276276

277277
app.verbose(
278-
lambda: "Executing robot with following options:\n "
279-
+ " ".join(f'"{o}"' for o in (cmd_options + list(robot_options_and_args)))
278+
lambda: (
279+
"Executing robot with following options:\n "
280+
+ " ".join(f'"{o}"' for o in (cmd_options + list(robot_options_and_args)))
281+
)
280282
)
281283

282284
if root_folder is not None:

packages/runner/src/robotcode/runner/cli/testdoc.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ def testdoc(app: Application, robot_options_and_args: Tuple[str, ...]) -> None:
8989
options = testdoc_options.build_command_line()
9090

9191
app.verbose(
92-
lambda: "Executing testdoc with the following options:\n "
93-
+ " ".join(f'"{o}"' for o in (options + list(robot_options_and_args)))
92+
lambda: (
93+
"Executing testdoc with the following options:\n "
94+
+ " ".join(f'"{o}"' for o in (options + list(robot_options_and_args)))
95+
)
9496
)
9597

9698
app.exit(

0 commit comments

Comments
 (0)