Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use snapshot based tests for printers #2416

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Prev Previous commit
Next Next commit
Fix linter warnings
DarkaMaul committed Apr 16, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 336344aaf5a5f5a4c27cbcb60b1b69919cbd91b0
9 changes: 1 addition & 8 deletions slither/printers/guidance/echidna.py
Original file line number Diff line number Diff line change
@@ -156,15 +156,8 @@ def _extract_assert(contracts: List[Contract]) -> Dict[str, Dict[str, List[Dict]

# Create a named tuple that is serialization in json
def json_serializable(cls):
# pylint: disable=unnecessary-comprehension
# TODO: the next line is a quick workaround to prevent pylint from crashing
# It can be removed once https://github.com/PyCQA/pylint/pull/3810 is merged
my_super = super

def as_dict(self):
yield {
name: value for name, value in zip(self._fields, iter(my_super(cls, self).__iter__()))
}
yield dict(zip(self._fields, super(cls, self).__iter__()))

cls.__iter__ = as_dict
return cls