From 6d685711dd1d6b14605df2e801e579e2647f5c9a Mon Sep 17 00:00:00 2001 From: webthethird Date: Mon, 20 Mar 2023 10:53:29 -0500 Subject: [PATCH] Pylint and black --- slither/utils/code_generation.py | 9 ++++++--- tests/test_code_generation.py | 5 ----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/slither/utils/code_generation.py b/slither/utils/code_generation.py index fa1793b4f..951bf4702 100644 --- a/slither/utils/code_generation.py +++ b/slither/utils/code_generation.py @@ -1,7 +1,6 @@ # Functions for generating Solidity code from typing import TYPE_CHECKING, Optional -from slither.core.solidity_types.user_defined_type import UserDefinedType from slither.utils.type import convert_type_for_solidity_signature_to_string if TYPE_CHECKING: @@ -23,8 +22,12 @@ def generate_interface(contract: "Contract") -> str: name, args = event.signature interface += f" event {name}({', '.join(args)});\n" for error in contract.custom_errors: - args = [convert_type_for_solidity_signature_to_string(arg.type).replace("(", "").replace(")", "") - for arg in error.parameters] + args = [ + convert_type_for_solidity_signature_to_string(arg.type) + .replace("(", "") + .replace(")", "") + for arg in error.parameters + ] interface += f" error {error.name}({', '.join(args)});\n" for enum in contract.enums: interface += f" enum {enum.name} {{ {', '.join(enum.values)} }}\n" diff --git a/tests/test_code_generation.py b/tests/test_code_generation.py index 35db30a44..13d1c8fb0 100644 --- a/tests/test_code_generation.py +++ b/tests/test_code_generation.py @@ -3,11 +3,8 @@ import os from solc_select import solc_select from slither import Slither -from slither.core.expressions import Literal from slither.utils.code_generation import ( generate_interface, - generate_interface_function_signature, - generate_struct_interface_str, ) SLITHER_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -26,5 +23,3 @@ def test_interface_generation() -> None: expected = file.read() assert actual == expected - -