Skip to content

Commit 417e75b

Browse files
committed
lint: remove old pylint comments
1 parent 485b5e0 commit 417e75b

26 files changed

+12
-65
lines changed

crytic_compile/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def parse_args() -> argparse.Namespace:
148148
return args
149149

150150

151-
class ShowPlatforms(argparse.Action): # pylint: disable=too-few-public-methods
151+
class ShowPlatforms(argparse.Action):
152152
"""
153153
This class is used to print the different platforms supported to the log
154154
See --supported-platforms

crytic_compile/compilation_unit.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from crytic_compile import CryticCompile
2121

2222

23-
# pylint: disable=too-many-instance-attributes
2423
class CompilationUnit:
2524
"""CompilationUnit class"""
2625

@@ -239,7 +238,6 @@ def filename_lookup(self, filename: str) -> Filename:
239238
Returns:
240239
Filename: Associated Filename object
241240
"""
242-
# pylint: disable=import-outside-toplevel
243241
from crytic_compile.platform.hardhat import Hardhat
244242
from crytic_compile.platform.truffle import Truffle
245243

crytic_compile/compiler/compiler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
LOGGER = logging.getLogger("CryticCompile")
88

99

10-
# pylint: disable=too-few-public-methods
1110
class CompilerVersion:
1211
"""
1312
Class representing the compiler information

crytic_compile/crytic_compile.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
logging.basicConfig()
4242

4343

44-
# pylint: disable=too-many-lines
45-
46-
4744
def get_platforms() -> list[type[AbstractPlatform]]:
4845
"""Return the available platforms classes in order of preference
4946
@@ -111,13 +108,11 @@ def _configure_solc(solc_requested: str, offline: bool) -> str:
111108
return solc_path.absolute().as_posix()
112109

113110

114-
# pylint: disable=too-many-instance-attributes
115111
class CryticCompile:
116112
"""
117113
Main class.
118114
"""
119115

120-
# pylint: disable=too-many-branches
121116
def __init__(self, target: str | AbstractPlatform, **kwargs: str) -> None:
122117
"""See https://github.com/crytic/crytic-compile/wiki/Configuration
123118
Target is usually a file or a project directory. It can be an AbstractPlatform
@@ -152,7 +147,6 @@ def __init__(self, target: str | AbstractPlatform, **kwargs: str) -> None:
152147
else:
153148
self._working_dir = Path.cwd()
154149

155-
# pylint: disable=too-many-nested-blocks
156150
if isinstance(target, str):
157151
platform = self._init_platform(target, **kwargs)
158152
# If the platform is Solc it means we are trying to compile a single
@@ -588,7 +582,6 @@ def export(self, **kwargs: str) -> list[str]:
588582
###################################################################################
589583
###################################################################################
590584

591-
# pylint: disable=no-self-use
592585
def _init_platform(self, target: str, **kwargs: str) -> AbstractPlatform:
593586
"""Init the platform
594587

crytic_compile/platform/abstract_platform.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ class IncorrectPlatformInitialization(Exception):
2020
Exception raises if a platform was not properly defined
2121
"""
2222

23-
# pylint: disable=unnecessary-pass
2423
pass
2524

2625

27-
# pylint: disable=too-many-instance-attributes
2826
@dataclass
2927
class PlatformConfig:
3028
"""
@@ -179,7 +177,7 @@ def is_dependency(self, path: str) -> bool:
179177
return False
180178

181179
@staticmethod
182-
def config(working_dir: str) -> PlatformConfig | None: # pylint: disable=unused-argument
180+
def config(working_dir: str) -> PlatformConfig | None:
183181
"""Return configuration data that should be passed to solc, such as version, remappings ecc.
184182
185183
Args:
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
"""
22
Module containing all the platforms
33
"""
4-
# pylint: disable=unused-import

crytic_compile/platform/archive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def compile(self, crytic_compile: "CryticCompile", **_kwargs: str) -> None:
7575
crytic_compile (CryticCompile): associated CryticCompile object
7676
**_kwargs: unused
7777
"""
78-
# pylint: disable=import-outside-toplevel
78+
7979
from crytic_compile.crytic_compile import get_platforms
8080

8181
try:

crytic_compile/platform/brownie.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
7979
LOGGER.error(stderr)
8080

8181
except OSError as error:
82-
# pylint: disable=raise-missing-from
8382
raise InvalidCompilation(error)
8483

8584
if not os.path.isdir(os.path.join(self._target, build_directory)):
@@ -135,7 +134,6 @@ def _guessed_tests(self) -> list[str]:
135134
return ["brownie test"]
136135

137136

138-
# pylint: disable=too-many-locals
139137
def _iterate_over_files(
140138
crytic_compile: "CryticCompile", target: Path, filenames: list[Path]
141139
) -> None:

crytic_compile/platform/buidler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class Buidler(AbstractPlatform):
3636
PROJECT_URL = "https://github.com/nomiclabs/buidler"
3737
TYPE = Type.BUILDER
3838

39-
# pylint: disable=too-many-locals,too-many-statements,too-many-branches
4039
def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
4140
"""Run the compilation
4241

crytic_compile/platform/dapp.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class Dapp(AbstractPlatform):
3939
PROJECT_URL = "https://github.com/dapphub/dapptools"
4040
TYPE = Type.DAPP
4141

42-
# pylint: disable=too-many-locals
4342
def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
4443
"""Run the compilation
4544
@@ -189,7 +188,7 @@ def _run_dapp(target: str) -> None:
189188
Raises:
190189
InvalidCompilation: If dapp failed to run
191190
"""
192-
# pylint: disable=import-outside-toplevel
191+
193192
from crytic_compile.platform.exceptions import InvalidCompilation
194193

195194
cmd = ["dapp", "build"]
@@ -204,7 +203,6 @@ def _run_dapp(target: str) -> None:
204203
) as process:
205204
_, _ = process.communicate()
206205
except OSError as error:
207-
# pylint: disable=raise-missing-from
208206
raise InvalidCompilation(error)
209207

210208

0 commit comments

Comments
 (0)