Skip to content

Commit

Permalink
Merge pull request #46094 from smuzaffar/reconstruction-py312-SyntaxW…
Browse files Browse the repository at this point in the history
…arning

[RECONSTRUCTION] [PY312] String formatting to fix SyntaxWarning
  • Loading branch information
cmsbuild authored Sep 24, 2024
2 parents 1e6ae4b + 528766d commit 1d1c279
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RecoTauTag/RecoTau/python/TauDiscriminatorTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def subParameterSets(pSet):

# For RECO type taus, where the tau producer is [tauType]Producer
import re
recoTauTypeMapperRegex = re.compile("(\w*)Producer")
recoTauTypeMapperRegex = re.compile("(\\w*)Producer")
def recoTauTypeMapper(tauProducer):
return recoTauTypeMapperRegex.match(tauProducer).group(1)

Expand Down
2 changes: 1 addition & 1 deletion RecoTauTag/RecoTau/python/tools/runTauIdMVA.py
Original file line number Diff line number Diff line change
Expand Up @@ -1314,7 +1314,7 @@ def getDeepTauVersion(self, file_name):
"""returns the DeepTau year, version, subversion. File name should contain a version label with data takig year \
(2011-2, 2015-8), version number (vX) and subversion (pX), e.g. 2017v0p6, in general the following format: \
{year}v{version}p{subversion}"""
version_search = re.search('(20[1,2][125678])v([0-9]+)(p[0-9]+|)[\._]', file_name)
version_search = re.search('(20[1,2][125678])v([0-9]+)(p[0-9]+|)[\\._]', file_name)
if not version_search:
raise RuntimeError('File "{}" has an invalid name pattern, should be in the format "{year}v{version}p{subversion}". \
Unable to extract version number.'.format(file_name))
Expand Down

0 comments on commit 1d1c279

Please sign in to comment.