Skip to content

Commit

Permalink
Refactor storage variables printer to use derived contracts and impro…
Browse files Browse the repository at this point in the history
…ve filtering
  • Loading branch information
nisedo committed Feb 17, 2025
1 parent 81e4140 commit 02778e2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions slither/printers/summary/storage_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
Expand Down

0 comments on commit 02778e2

Please sign in to comment.