Apache Lucene open-source search software
No ruff violation (#14725)
Mariah Wilcher686ef91e15f6
diff --git a/dev-tools/scripts/create_line_file_docs.py b/dev-tools/scripts/create_line_file_docs.pyindex 1dd9963ecdc..e10cdcc673e 100644--- a/dev-tools/scripts/create_line_file_docs.py+++ b/dev-tools/scripts/create_line_file_docs.py@@ -24,6 +24,7 @@ import tempfileimport timeimport urllib.requestfrom io import TextIOWrapper+from pathlib import PathDEBUG = False@@ -113,7 +114,7 @@ def sample_europarl():if not os.path.exists(file_name):print("Download %s to %s..." % (EUROPARL_V7_URL, file_name))urllib.request.urlretrieve(EUROPARL_V7_URL, file_name + ".tmp")- os.rename(file_name + ".tmp", file_name)+ _ = Path(f"{file_name}.tmp").rename(file_name)else:print("%s already here; skipping download..." % file_name)diff --git a/dev-tools/scripts/pyproject.toml b/dev-tools/scripts/pyproject.tomlindex b2a91acb00f..459aca9b819 100644--- a/dev-tools/scripts/pyproject.toml+++ b/dev-tools/scripts/pyproject.toml@@ -46,8 +46,6 @@ ignore = ["ANN204", # missing return annotation for special method"ANN206", # missing return annotation for classmethod"ANN401", # use of Any as function parameter- "ARG001", # unused function argument- "ARG002", # unused method argument"ARG005", # unused lambda argument"B006", # do not use mutable datastructures for arg defaults"B904", # within except clause, raise exceptions with .. fromdiff --git a/dev-tools/scripts/reproduceJenkinsFailures.py b/dev-tools/scripts/reproduceJenkinsFailures.pyindex aef89df9fca..46cf712c693 100644--- a/dev-tools/scripts/reproduceJenkinsFailures.py+++ b/dev-tools/scripts/reproduceJenkinsFailures.py@@ -238,7 +238,7 @@ def printAndMoveReports(testIters: int, newSubDir: str, location: str):# have to play nice with 'ant clean'...newDirPath = os.path.join("repro-reports", newSubDir, dir)Path(newDirPath).mkdir(exist_ok=True, parents=True)- os.rename(filePath, os.path.join(newDirPath, file))+ _ = Path(filePath).rename(target=os.path.join(newDirPath, file))print("[repro] Failures%s:" % location)for testcase in sorted(failures, key=lambda t: (failures[t], t)): # sort by failure count, then by testcaseprint("[repro] %d/%d failed: %s" % (failures[testcase], testIters, testcase))