From 02778e29a2fce408045ee974656f77203fc6bb9a Mon Sep 17 00:00:00 2001 From: nisedo <73041332+nisedo@users.noreply.github.com> Date: Mon, 17 Feb 2025 20:42:53 +0100 Subject: [PATCH] Refactor storage variables printer to use derived contracts and improve filtering --- slither/printers/summary/storage_variables.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/slither/printers/summary/storage_variables.py b/slither/printers/summary/storage_variables.py index c3c380eee..fd0360d0e 100644 --- a/slither/printers/summary/storage_variables.py +++ b/slither/printers/summary/storage_variables.py @@ -21,15 +21,13 @@ def output(self, _filename) -> Output: Args: _filename(string) """ - excluded_paths = {"lib/", "node_modules/", "test/", "tests/", "mock/", "mocks/", "scripts/"} all_contracts = [] for contract in sorted( ( c - for c in self.contracts - if not (c.is_interface or c.is_library or c.is_abstract) - and not any(path in c.source_mapping.filename.absolute for path in excluded_paths) + for c in self.slither.contracts_derived + if not c.is_test and not c.is_from_dependency() ), key=lambda x: x.name, ):