Skip to content

Commit

Permalink
To suppress "SyntaxWarning: invalid escape sequence" in angel2root
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazuyoshi Furutaka (work) committed Nov 28, 2023
1 parent 7581c72 commit 250da8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mctools/phits/angel2root.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ def isData(line):
"""

# SUBT = re.compile('prot*')
SUBT = re.compile("""
SUBT = re.compile(r"""
\(
(?P<subtitle>.*)\s*?
\)
""", re.VERBOSE)

#: a regular expression which describes the page-separating line.
pageSepRE = re.compile("^[\s#]newpage:$")
pageSepRE = re.compile(r"^[\s#]newpage:$")

DEBUG = False
#DEBUG = True
Expand Down Expand Up @@ -608,7 +608,7 @@ def main():
args = parser.parse_args()

fname_in = args.infilename[0]
fname_out = re.sub("\....$", ".root", fname_in)
fname_out = re.sub(r"\....$", ".root", fname_in)
if fname_in == fname_out:
fname_out = fname_in + ".root"
print(fname_in, "->" ,fname_out)
Expand Down

0 comments on commit 250da8f

Please sign in to comment.