Skip to content

Commit cf29489

Browse files
authored
fix: fix SyntaxWarning: invalid escape sequence (#1550)
``` /home/runner/work/dpgen/dpgen/dpgen/auto_test/Gamma.py:389: SyntaxWarning: invalid escape sequence '\(' upper = re.search("variable N equal count\(all\)", contents[ii]) ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved the reliability of the Gamma module by correcting a regular expression pattern. This change ensures more accurate data parsing and handling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Jinzhe Zeng <[email protected]>
1 parent 07f745b commit cf29489

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dpgen/auto_test/Gamma.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def __inLammpes_fix(self, inLammps) -> None:
386386
with open(inLammps) as fin1:
387387
contents = fin1.readlines()
388388
for ii in range(len(contents)):
389-
upper = re.search("variable N equal count\(all\)", contents[ii])
389+
upper = re.search(r"variable N equal count\(all\)", contents[ii])
390390
lower = re.search("min_style cg", contents[ii])
391391
if lower:
392392
lower_id = ii

0 commit comments

Comments
 (0)