Skip to content

Commit 9ea7da8

Browse files
committed
fixing black lint issues
1 parent b25757c commit 9ea7da8

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

manager/manager/lint/linter.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,18 @@ def evaluate_code(
119119

120120
if loop_match is None:
121121
return "ERROR: No event loop found. Add 'while True:', 'rclpy.spin(node)', or 'rclpy.spin_once(node)' or use 'Rate'"
122-
123-
if "rclpy.spin" in loop_match.group() or "rclpy.spin_once" in loop_match.group() or ".create_rate" in loop_match.group():
122+
123+
if (
124+
"rclpy.spin" in loop_match.group()
125+
or "rclpy.spin_once" in loop_match.group()
126+
or ".create_rate" in loop_match.group()
127+
):
124128
# Keep the code as-is; don't modify it
125129
pass
126130
else:
127131
# Modify code for while True (add frequency control)
128-
sequential_code = code[:loop_match.start()]
129-
iterative_code = code[loop_match.start():]
132+
sequential_code = code[: loop_match.start()]
133+
iterative_code = code[loop_match.start() :]
130134
iterative_code = re.sub(loop_regex, "\n", iterative_code, 1)
131135
iterative_code = re.sub(r"^[ ]{4}", "", iterative_code, flags=re.M)
132136
code = sequential_code + iterative_code

manager/manager/manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ def find_docker_console():
653653

654654
# raise Exception("No active console other than /dev/pts/0")
655655
return consoles
656-
656+
657657
def prepare_RA_code(code_path):
658658
f = open(code_path, "r")
659659
code = f.read()
@@ -675,7 +675,7 @@ def prepare_RA_code(code_path):
675675
else:
676676
console_path = find_docker_console()
677677
for i in console_path:
678-
with open(i, 'w') as console:
678+
with open(i, "w") as console:
679679
console.write(errors + "\n\n")
680680

681681
raise Exception(errors)

0 commit comments

Comments
 (0)