Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Feb 27, 2023
1 parent edfd1f5 commit 95da331
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/python/rv/modules/multictl.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,10 @@ def reflect(self, index=0, propagate=True):
It is the inverse of setting value.
"""
if index >= len(self.out_links):
raise IndexError("No destination module mapped at index {}".format(index))
raise IndexError(f"No destination module mapped at index {index}")
mapping = self.mappings.values[index]
if mapping.controller == 0:
raise IndexError(
"No destination controller mapped at index {}".format(index)
)
raise IndexError(f"No destination controller mapped at index {index}")
reflect_mod = self.parent.modules[self.out_links[index]]
reflect_ctl_name = list(reflect_mod.controllers)[mapping.controller - 1]
reflect_ctl = reflect_mod.controllers[reflect_ctl_name]
Expand Down

0 comments on commit 95da331

Please sign in to comment.