From 078a3db51f063bef06316c61f6e0b432738e536a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Mon, 12 Feb 2024 20:11:10 -0300 Subject: [PATCH] pylint: fix further lint errors --- pyproject.toml | 3 ++- slither/solc_parsing/slither_compilation_unit_solc.py | 1 + tests/tools/read-storage/conftest.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 179220ca36..e7cf3567d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,5 +17,6 @@ logging-fstring-interpolation, logging-not-lazy, duplicate-code, import-error, -unsubscriptable-object +unsubscriptable-object, +unnecessary-lambda-assignment """ diff --git a/slither/solc_parsing/slither_compilation_unit_solc.py b/slither/solc_parsing/slither_compilation_unit_solc.py index c733e5a869..f93533ec71 100644 --- a/slither/solc_parsing/slither_compilation_unit_solc.py +++ b/slither/solc_parsing/slither_compilation_unit_solc.py @@ -406,6 +406,7 @@ def parse_contracts(self) -> None: # pylint: disable=too-many-statements,too-ma f"No contracts were found in {self._compilation_unit.core.filename}, check the correct compilation" ) if self._parsed: + # pylint: disable=broad-exception-raised raise Exception("Contract analysis can be run only once!") # First we save all the contracts in a dict diff --git a/tests/tools/read-storage/conftest.py b/tests/tools/read-storage/conftest.py index 6d8a71b585..726448b13f 100644 --- a/tests/tools/read-storage/conftest.py +++ b/tests/tools/read-storage/conftest.py @@ -23,6 +23,7 @@ def __init__(self, provider: str, eth_address: str, eth_privkey: str): def fixture_ganache() -> Generator[GanacheInstance, None, None]: """Fixture that runs ganache""" if not shutil.which("ganache"): + # pylint: disable=broad-exception-raised raise Exception( "ganache was not found in PATH, you can install it with `npm install -g ganache`" )