From 0586ecddbfeab16042ecfcfcdf7d4dac866321f1 Mon Sep 17 00:00:00 2001 From: Simone Date: Wed, 2 Apr 2025 17:21:32 +0200 Subject: [PATCH 1/2] Check if a contract is an interface --- slither/tools/mutator/__main__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/slither/tools/mutator/__main__.py b/slither/tools/mutator/__main__.py index 7d97d79bef..1eb5f3faed 100644 --- a/slither/tools/mutator/__main__.py +++ b/slither/tools/mutator/__main__.py @@ -265,9 +265,7 @@ def main() -> None: # pylint: disable=too-many-statements,too-many-branches,too if target_contract == skip_flag: continue - # TODO: find a more specific way to omit interfaces - # Ideally, we wouldn't depend on naming conventions - if target_contract.name.startswith("I"): + if target_contract.is_interface: logger.debug(f"Skipping mutations on interface {filename}") continue From b27176d1fe787b8735174876d8f158e81b194df4 Mon Sep 17 00:00:00 2001 From: Simone Date: Wed, 2 Apr 2025 17:22:45 +0200 Subject: [PATCH 2/2] Fix typo --- slither/tools/mutator/mutators/LIR.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/tools/mutator/mutators/LIR.py b/slither/tools/mutator/mutators/LIR.py index 46d816e26a..fe0d2cf5cd 100644 --- a/slither/tools/mutator/mutators/LIR.py +++ b/slither/tools/mutator/mutators/LIR.py @@ -10,7 +10,7 @@ class LIR(AbstractMutator): # pylint: disable=too-few-public-methods NAME = "LIR" - HELP = "Literal Interger Replacement" + HELP = "Literal Integer Replacement" def _mutate(self) -> Dict: # pylint: disable=too-many-branches result: Dict = {}