Skip to content

Commit

Permalink
Formatting, made requirements error more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel1464 committed Oct 6, 2024
1 parent 49bb198 commit fd26e14
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion commands2/parallelcommandgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def addCommands(self, *commands: Command):
for command in commands:
in_common = command.getRequirements().intersection(self.requirements)
if in_common:
requirements_str = ", ".join([s.getName() for s in command.getRequirements()])
requirements_str = ", ".join(
[s.getName() for s in in_common]
)
raise IllegalCommandUse(
f"Command {command.getName()} could not be added to this ParallelCommandGroup"
f" because the subsystems [{requirements_str}] are already required in this command."
Expand Down
4 changes: 3 additions & 1 deletion commands2/paralleldeadlinegroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ def addCommands(self, *commands: Command):
for command in commands:
in_common = command.getRequirements().intersection(self.requirements)
if in_common:
requirements_str = ", ".join([s.getName() for s in command.getRequirements()])
requirements_str = ", ".join(
[s.getName() for s in in_common]
)
raise IllegalCommandUse(
f"Command {command.getName()} could not be added to this ParallelCommandGroup"
f" because the subsystems [{requirements_str}] are already required in this command."
Expand Down
4 changes: 3 additions & 1 deletion commands2/parallelracegroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def addCommands(self, *commands: Command):
for command in commands:
in_common = command.getRequirements().intersection(self.requirements)
if in_common:
requirements_str = ", ".join([s.getName() for s in command.getRequirements()])
requirements_str = ", ".join(
[s.getName() for s in in_common]
)
raise IllegalCommandUse(
f"Command {command.getName()} could not be added to this ParallelCommandGroup"
f" because the subsystems [{requirements_str}] are already required in this command."
Expand Down

0 comments on commit fd26e14

Please sign in to comment.