Fix pylint 2.16 warnings

This commit is contained in:
Rodrigo Q. Saramago
2023-02-01 10:39:00 -03:00
committed by Matheus Aguiar
parent 37953a7eb0
commit 828f95ad9e
4 changed files with 7 additions and 6 deletions
+4 -4
View File
@@ -591,7 +591,7 @@ class FileTestRunner:
for diagnostics in published_diagnostics:
if not diagnostics["uri"].startswith(self.suite.project_root_uri + "/"):
raise Exception(
raise RuntimeError(
f"'{self.test_name}.sol' imported file outside of test directory: '{diagnostics['uri']}'"
)
self.open_tests.append(self.suite.normalizeUri(diagnostics["uri"]))
@@ -804,9 +804,9 @@ class FileTestRunner:
if tag == desired_tag:
return tagRange
elif tag.lower() == desired_tag.lower():
raise Exception(f"Detected lower/upper case mismatch: Requested {desired_tag} but only found {tag}")
raise RuntimeError(f"Detected lower/upper case mismatch: Requested {desired_tag} but only found {tag}")
raise Exception(f"Marker {desired_tag} not found in file")
raise RuntimeError(f"Marker {desired_tag} not found in file")
# Check if we need markers from a specific file
@@ -1032,7 +1032,7 @@ class SolidityLSPTestSuite: # {{{
tag = self.find_tag_with_range(testname, local_sub_dir, diagnostic['range'])
if tag is None:
raise Exception(f"No tag found for diagnostic range {diagnostic['range']}")
raise RuntimeError(f"No tag found for diagnostic range {diagnostic['range']}")
expectations += f" {tag} {diagnostic['code']}"
expectations += "\n"