Skip to content

Commit

Permalink
Fix invalid escape sequence warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Dec 7, 2022
1 parent e04608b commit 452df29
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ilcsoft/cernlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def cleanupInstall(self):
#os.chdir( self.installPath + "/build" )

## delete object files
os_system( "find "+self.installPath + "/build -type f -name *.o -exec rm -f {} \;" )
os_system( "find "+self.installPath + r"/build -type f -name *.o -exec rm -f {} \;" )

def postCheckDeps(self):
BaseILC.postCheckDeps(self)
Expand Down
2 changes: 1 addition & 1 deletion ilcsoft/ilcsoft.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def __init__(self, installPath):
#fg: release_string might be empty, e.g. if lsb_release does not exis (MacOs)
self.release_number = '-1'
if len( release_string ):
self.release_number = release_string[re.search('\d', release_string).start()]
self.release_number = release_string[re.search(r'\d', release_string).start()]

for k,v in self.debugInfo.items():
print("+", k, '\t', str(v).replace("\n","\n\t\t"))
Expand Down
2 changes: 1 addition & 1 deletion ilcsoft/ninja.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def compile(self):
def cleanupInstall(self):
BaseILC.cleanupInstall(self)
os.chdir( self.installPath )
os_system( "find . \! -name 'ninja' -delete" )
os_system( r"find . \! -name 'ninja' -delete" )

def postCheckDeps(self):
BaseILC.postCheckDeps(self)
Expand Down
2 changes: 1 addition & 1 deletion scripts/tagging/parseversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _parseVersion( self ):
elif 'pre' in parts[2]:
self.pre = int(parts[2].strip('pre'))
else:
self.patch = int( parts[2] )
self.patch = int( parts[2].strip('p') )

if len(parts) >= 4:
if 'pre' == parts[3]:
Expand Down
6 changes: 3 additions & 3 deletions scripts/tests/Test_Tagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def test_ctor_fail_1( self ):
}
]

with self.assertRaisesRegexp( RuntimeError, "Invalid version required"), \
with self.assertRaisesRegex( RuntimeError, "Invalid version required"), \
patch( "tagging.gitinterface.Repo.getGithubTags", new=Mock( return_value=myTagInfo)):
self.repo = Repo(owner="tester", repo="testrepo", branch="testbranch", newVersion="v01-03-20-pre", preRelease=True, dryRun=True)

Expand All @@ -225,7 +225,7 @@ def test_ctor_fail_2( self ):
"tarball_url": "tarball/v0.1"
}
]
with self.assertRaisesRegexp( RuntimeError, "Invalid version required"), \
with self.assertRaisesRegex( RuntimeError, "Invalid version required"), \
patch( "tagging.gitinterface.Repo.getGithubTags", new=Mock( return_value=myTagInfo)):
self.repo = Repo(owner="tester", repo="testrepo", branch="testbranch", newVersion="v01-03-19", preRelease=True, dryRun=True)

Expand All @@ -241,7 +241,7 @@ def test_ctor_fail_3( self ):
]


with self.assertRaisesRegexp( RuntimeError, "Invalid version required"), \
with self.assertRaisesRegex( RuntimeError, "Invalid version required"), \
patch( "tagging.gitinterface.Repo.getGithubTags", new=Mock( return_value=myTagInfo)):
self.repo = Repo(owner="tester", repo="testrepo", branch="testbranch", newVersion="v01-03-20-pre1", preRelease=True, dryRun=True)

Expand Down

0 comments on commit 452df29

Please sign in to comment.