Skip to content

Commit

Permalink
fix deprecation warning on regex using backslash
Browse files Browse the repository at this point in the history
  • Loading branch information
VGPReys committed Jan 27, 2025
1 parent fec5484 commit 03d0143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/haddock/modules/topology/topoaa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ def get_ensemble_origin(ensemble_f: FilePath) -> dict[int, str]:
lines = text.split(os.linesep)
REMARK_lines = (line for line in lines if line.startswith("REMARK"))
re_origin = re.compile(
"REMARK\s+MODEL\s+(\d+)\s+(FROM|from|From)\s+(([\w_-]+\.?)+)"
) # noqa : E501
r"REMARK\s+MODEL\s+(\d+)\s+(FROM|from|From)\s+(([\w_-]+\.?)+)"
)
for line in REMARK_lines:
if match := re_origin.search(line):
model_num = int(match.group(1).strip())
Expand Down

0 comments on commit 03d0143

Please sign in to comment.