bin/checkExternalLibraries.py | 8 ++++---- bin/crashreportScraper.py | 2 +- solenv/bin/hrcex | 2 +- solenv/bin/uiex | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit f2ec97d1777feffd0263b805b56baa5a35c962f7 Author: RHUSHYA.K.C <[email protected]> AuthorDate: Tue Feb 24 18:08:10 2026 +0530 Commit: Ilmari Lauhakangas <[email protected]> CommitDate: Wed Feb 25 07:37:37 2026 +0100 tdf#158803 Fix issues detected by pyflakes Use raw strings for regex patterns with escape sequences in bin/checkExternalLibraries.py and bin/crashreportScraper.py to fix SyntaxWarning for invalid escape sequences. Remove unused exception variable in solenv/bin/hrcex and solenv/bin/uiex. Change-Id: Ib43ed0705e52abfcae646236364c8bffd8e7d583 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198943 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <[email protected]> diff --git a/bin/checkExternalLibraries.py b/bin/checkExternalLibraries.py index e41c161be370..9b29a5982215 100755 --- a/bin/checkExternalLibraries.py +++ b/bin/checkExternalLibraries.py @@ -64,14 +64,14 @@ libraryNames = { def get_current_version(libName): if "sqlite" in libName: # 3XXYYZZ -> 3.X.Y.Z - s = re.search("(\d{7})", libName ) + s = re.search(r"(\d{7})", libName ) if s: num = str(s.group(1)) return parse("{}.{}.{}.{}".format(num[0], num[1:3], num[3:5], num[6:7])) else: libraryName = libName.replace("_", ".") libraryName = re.sub("[0-9a-f]{5,40}", "", libraryName) #SHA1 - s = re.search("\d[\d\.]+\d", libraryName ) + s = re.search(r"\d[\d\.]+\d", libraryName ) if s: return parse(s.group()) @@ -97,9 +97,9 @@ def get_library_list(fileName): for libraryBranch in libraryBranches: if libraryName.lower().startswith(libraryBranch): if libraryBranch == "postgres": - branch = ''.join(re.findall("\d{1,2}", libraryName)[0]) + branch = ''.join(re.findall(r"\d{1,2}", libraryName)[0]) else: - branch = ''.join(re.findall("\d{1,2}\.\d{1,2}", libraryName)[0]) + branch = ''.join(re.findall(r"\d{1,2}\.\d{1,2}", libraryName)[0]) branches[libraryBranch] = branch print(libraryBranch + " is on branch: " + str(branch)) break diff --git a/bin/crashreportScraper.py b/bin/crashreportScraper.py index 48331d4e280a..479ea49434a6 100755 --- a/bin/crashreportScraper.py +++ b/bin/crashreportScraper.py @@ -116,7 +116,7 @@ def parse_reports_and_get_most_recent_report_from_last_page(signature, session): td_list = tr.find_all("td") currentID = td_list[0].a.text.strip() - currentVersion = int(''.join(re.findall("\d+", td_list[2].text))) + currentVersion = int(''.join(re.findall(r"\d+", td_list[2].text))) currentOS = td_list[3].text.strip() # get most recent version diff --git a/solenv/bin/hrcex b/solenv/bin/hrcex index 36bac57bde83..0b1132bb0fa2 100755 --- a/solenv/bin/hrcex +++ b/solenv/bin/hrcex @@ -8,7 +8,7 @@ from subprocess import check_output, Popen, PIPE try: myopts, args = getopt.getopt(sys.argv[1:], "i:o:") -except getopt.GetoptError as e: +except getopt.GetoptError: print(" Syntax: hrcex -i FileIn -o FileOut") print(" FileIn: Source files (*.hrc)") print(" FileOut: Destination file (*.*)") diff --git a/solenv/bin/uiex b/solenv/bin/uiex index 8508f8eae70c..acbf97da4a2c 100755 --- a/solenv/bin/uiex +++ b/solenv/bin/uiex @@ -8,7 +8,7 @@ from subprocess import check_output try: myopts, args = getopt.getopt(sys.argv[1:], "i:o:") -except getopt.GetoptError as e: +except getopt.GetoptError: print(" Syntax: uiex -i FileIn -o FileOut") print(" FileIn: Source files (*.ui)") print(" FileOut: Destination file (*.*)")
