Skip to content

Commit

Permalink
fix(log_parser): fix regex expression to respect sonar rule
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle authored and laurent-laporte-pro committed Aug 2, 2023
1 parent 437c080 commit 38d6bea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions antarest/launcher/adapters/log_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def update_progress(
) -> bool:
if "MC-Years : [" in line:
if regex_result := re.search(
r".+?(?:\s\.\.\s)(\d+).+?(\d+)", line
r"MC-Years : \[\d+ .. \d+], total: (\d+)", line
):
launch_progress_dto.total_mc_years_to_perform = int(
regex_result[2]
regex_result[1]
)
return True
else:
Expand Down

0 comments on commit 38d6bea

Please sign in to comment.