Skip to content

Commit d890670

Browse files
committed
pylint
1 parent 4ee6d3b commit d890670

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

crytic_compile/platform/foundry.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
"""
22
Truffle platform
33
"""
4-
import json
54
import logging
65
import os
76
import shutil
87
import subprocess
98
from pathlib import Path
109
from typing import TYPE_CHECKING, List
1110

12-
from crytic_compile.compilation_unit import CompilationUnit
13-
from crytic_compile.compiler.compiler import CompilerVersion
1411
from crytic_compile.platform.abstract_platform import AbstractPlatform
15-
from crytic_compile.platform.exceptions import InvalidCompilation
1612
from crytic_compile.platform.types import Type
17-
from crytic_compile.utils.naming import convert_filename, extract_name
18-
from crytic_compile.utils.natspec import Natspec
1913
from .hardhat import hardhat_like_parsing
2014

21-
from .solc import relative_to_short
22-
2315
# Handle cycle
2416
if TYPE_CHECKING:
2517
from crytic_compile import CryticCompile

crytic_compile/platform/hardhat.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,24 @@
2525

2626
LOGGER = logging.getLogger("CryticCompile")
2727

28-
28+
# pylint: disable=too-many-locals
2929
def hardhat_like_parsing(
3030
crytic_compile: "CryticCompile", target: str, build_directory: Path, working_dir: str
3131
) -> None:
32+
"""
33+
This function parse the output generated by hardhat.
34+
It can be re-used by any platform that follows the same schema (ex:foudnry)
35+
36+
37+
Args:
38+
crytic_compile: CryticCompile object
39+
target: target
40+
build_directory: build directory
41+
working_dir: working directory
42+
43+
Returns:
44+
45+
"""
3246
files = sorted(
3347
os.listdir(build_directory), key=lambda x: os.path.getmtime(Path(build_directory, x))
3448
)
@@ -128,7 +142,6 @@ class Hardhat(AbstractPlatform):
128142
PROJECT_URL = "https://github.com/nomiclabs/hardhat"
129143
TYPE = Type.HARDHAT
130144

131-
# pylint: disable=too-many-locals,too-many-statements
132145
def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
133146
"""Run the compilation
134147

0 commit comments

Comments
 (0)