Skip to content

Commit 6b631a7

Browse files
committed
CI: fix E701 lint errors in level.py param-build wrappers
The previous commit introduced 12 cases of 'if cond: stmt' on a single line across get_actor_property_metadata, spawn_actor_by_class, and find_actors. ruff E701 (multiple statements on one line) flagged all of them in CI. Same rule that was previously fixed in niagara.py — splitting each into two-line form here as well.
1 parent 98589b4 commit 6b631a7

1 file changed

Lines changed: 29 additions & 13 deletions

File tree

unrealmcp/tools/level.py

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,14 @@ def get_actor_property_metadata(
201201
"max_entries": max_entries,
202202
"cursor": cursor,
203203
}
204-
if property_path: params["property_path"] = property_path
205-
if filter: params["filter"] = filter
206-
if category: params["category"] = category
207-
if component_name: params["component_name"] = component_name
204+
if property_path:
205+
params["property_path"] = property_path
206+
if filter:
207+
params["filter"] = filter
208+
if category:
209+
params["category"] = category
210+
if component_name:
211+
params["component_name"] = component_name
208212
return _call("get_actor_property_metadata", params)
209213

210214

@@ -237,10 +241,14 @@ def spawn_actor_by_class(
237241
scale: [x, y, z] scale.
238242
"""
239243
params: dict = {"class_path": class_path}
240-
if name: params["name"] = name
241-
if location: params["location"] = location
242-
if rotation: params["rotation"] = rotation
243-
if scale: params["scale"] = scale
244+
if name:
245+
params["name"] = name
246+
if location:
247+
params["location"] = location
248+
if rotation:
249+
params["rotation"] = rotation
250+
if scale:
251+
params["scale"] = scale
244252
return _call("spawn_actor_by_class", params)
245253

246254

@@ -272,9 +280,17 @@ def find_actors(
272280
max_results: Cap on returned entries (0 = unlimited; truncated flag set).
273281
include_transform: Include location/rotation/scale per entry.
274282
"""
275-
params: dict = {"max_results": max_results, "exact_class": exact_class, "include_transform": include_transform}
276-
if name_pattern: params["name_pattern"] = name_pattern
277-
if label_pattern: params["label_pattern"] = label_pattern
278-
if class_filter: params["class_filter"] = class_filter
279-
if tag: params["tag"] = tag
283+
params: dict = {
284+
"max_results": max_results,
285+
"exact_class": exact_class,
286+
"include_transform": include_transform,
287+
}
288+
if name_pattern:
289+
params["name_pattern"] = name_pattern
290+
if label_pattern:
291+
params["label_pattern"] = label_pattern
292+
if class_filter:
293+
params["class_filter"] = class_filter
294+
if tag:
295+
params["tag"] = tag
280296
return _call("find_actors", params)

0 commit comments

Comments
 (0)