File: test_lammps_regex_path.patch

package info (click to toggle)
pymatgen 2025.2.18%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 85,888 kB
  • sloc: python: 176,173; javascript: 780; makefile: 221; sh: 78
file content (13 lines) | stat: -rw-r--r-- 656 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
Index: pymatgen/src/pymatgen/io/lammps/outputs.py
===================================================================
--- pymatgen.orig/src/pymatgen/io/lammps/outputs.py	2025-02-20 11:46:02.871737234 +0100
+++ pymatgen/src/pymatgen/io/lammps/outputs.py	2025-02-20 11:46:02.867737465 +0100
@@ -111,7 +111,7 @@
     """
     files = glob(file_pattern)
     if len(files) > 1:
-        pattern = file_pattern.replace("*", "([0-9]+)").replace("\\", "\\\\")
+        pattern = file_pattern.replace("+",r"\+").replace("*", "([0-9]+)").replace("\\", "\\\\")
         files = sorted(files, key=lambda f: int(re.match(pattern, f)[1]))
 
     for filename in files: