mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix pylint 2.16 warnings
This commit is contained in:
parent
37953a7eb0
commit
828f95ad9e
@ -251,7 +251,7 @@ def detect_metadata_cli_option_support(compiler_path: Path):
|
|||||||
f"Compiler output:\n{process.stderr}\n",
|
f"Compiler output:\n{process.stderr}\n",
|
||||||
file=sys.stderr
|
file=sys.stderr
|
||||||
)
|
)
|
||||||
raise Exception("Failed to determine if the compiler supports the --metadata option.")
|
raise RuntimeError("Failed to determine if the compiler supports the --metadata option.")
|
||||||
|
|
||||||
return process.returncode == 0
|
return process.returncode == 0
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ def collect_statistics(lines) -> (int, int, int, int, int, int):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
if not lines:
|
if not lines:
|
||||||
raise Exception("Empty list")
|
raise RuntimeError("Empty list")
|
||||||
|
|
||||||
def try_parse(line):
|
def try_parse(line):
|
||||||
try:
|
try:
|
||||||
|
@ -23,6 +23,7 @@ disable=
|
|||||||
no-else-return,
|
no-else-return,
|
||||||
pointless-string-statement,
|
pointless-string-statement,
|
||||||
redefined-outer-name,
|
redefined-outer-name,
|
||||||
|
superfluous-parens,
|
||||||
too-few-public-methods,
|
too-few-public-methods,
|
||||||
too-many-arguments,
|
too-many-arguments,
|
||||||
too-many-branches,
|
too-many-branches,
|
||||||
|
@ -591,7 +591,7 @@ class FileTestRunner:
|
|||||||
|
|
||||||
for diagnostics in published_diagnostics:
|
for diagnostics in published_diagnostics:
|
||||||
if not diagnostics["uri"].startswith(self.suite.project_root_uri + "/"):
|
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']}'"
|
f"'{self.test_name}.sol' imported file outside of test directory: '{diagnostics['uri']}'"
|
||||||
)
|
)
|
||||||
self.open_tests.append(self.suite.normalizeUri(diagnostics["uri"]))
|
self.open_tests.append(self.suite.normalizeUri(diagnostics["uri"]))
|
||||||
@ -804,9 +804,9 @@ class FileTestRunner:
|
|||||||
if tag == desired_tag:
|
if tag == desired_tag:
|
||||||
return tagRange
|
return tagRange
|
||||||
elif tag.lower() == desired_tag.lower():
|
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
|
# 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'])
|
tag = self.find_tag_with_range(testname, local_sub_dir, diagnostic['range'])
|
||||||
|
|
||||||
if tag is None:
|
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 += f" {tag} {diagnostic['code']}"
|
||||||
expectations += "\n"
|
expectations += "\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user