Skip to content

Commit 2df8095

Browse files
committed
Apply Ruff formatting for python-formatting CI
Format the three files flagged by ruff format --check so the python-formatting job passes without code changes.
1 parent 46b8d98 commit 2df8095

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

are/simulation/gui/server/graphql/subscription.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ def get_world_logs_for_graphql(
458458
# Tool and action logs
459459
ToolCallLog: (
460460
AgentLogTypeForGraphQL.TOOL_CALL,
461-
lambda log: log.get_content_for_llm(), # Uses method to format tool call data
461+
lambda log: (
462+
log.get_content_for_llm()
463+
), # Uses method to format tool call data
462464
),
463465
# Final output logs
464466
FinalAnswerLog: (

are/simulation/scenarios/utils/import_utils.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ def import_scenario(scenario_file: str) -> Type[Scenario]:
2828

2929
m_scenarios = inspect.getmembers(
3030
m,
31-
lambda obj: inspect.isclass(obj)
32-
and obj.__module__
33-
== m.__name__ # ignore classes that are imported from other modules
34-
and hasattr(obj, "scenario_id")
35-
and obj.scenario_id,
31+
lambda obj: (
32+
inspect.isclass(obj)
33+
and obj.__module__
34+
== m.__name__ # ignore classes that are imported from other modules
35+
and hasattr(obj, "scenario_id")
36+
and obj.scenario_id
37+
),
3638
)
3739
if len(m_scenarios) != 1:
3840
raise ValueError(

are/simulation/scenarios/utils/load_utils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,8 @@ def load_scenarios_from_directory(
8686
if filename_with_ext.endswith(".json") and file_filter(filename_with_ext):
8787
filename = os.path.splitext(filename_with_ext)[0]
8888
scenario_id = f"scenario_{filename}"
89-
scenarios[scenario_id] = (
90-
lambda path=file, id=scenario_id, t=tags: load_and_setup_scenario(
91-
path, id, t
92-
)
89+
scenarios[scenario_id] = lambda path=file, id=scenario_id, t=tags: (
90+
load_and_setup_scenario(path, id, t)
9391
)
9492
logger.debug(
9593
f"Prepared to load scenario {filename_with_ext} into {scenario_id}"

0 commit comments

Comments
 (0)