Skip to content

Commit

Permalink
Optimise funtion
Browse files Browse the repository at this point in the history
  • Loading branch information
rgc99 committed Nov 22, 2023
1 parent 1d18b62 commit 95c2a4e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2638,7 +2638,10 @@ def zone_runs(self, sequence_zone: IUSequenceZone) -> list[IURun]:

def run_index(self, run: IURun) -> int:
"""Extract the index from the supplied run"""
return list(self._runs.keys()).index(run)
for i, key in enumerate(self._runs):
if key == run:
return i
return None

def sequence_zone(self, run: IURun) -> IUSequenceZone:
"""Extract the sequence zone from the run"""
Expand Down

0 comments on commit 95c2a4e

Please sign in to comment.