Skip to content

Commit

Permalink
feat: add only_include_project report config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Mar 28, 2021
1 parent f4fa2f8 commit efc74f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions brownie/data/default-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ console:
reports:
exclude_paths: null
exclude_contracts: null
only_include_project: true

hypothesis:
deadline: null
Expand Down
4 changes: 3 additions & 1 deletion brownie/test/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def _build_gas_profile_output():

lines = [""]

only_include_project = CONFIG.settings["reports"]["only_include_project"]
for full_name, values in sorted_gas:
contract, function = full_name.split(".", 1)

Expand All @@ -82,7 +83,8 @@ def _build_gas_profile_output():
continue
except (AttributeError, KeyError):
# filters contracts that are not part of the project
continue
if only_include_project:
continue
if contract in exclude_contracts:
continue

Expand Down

0 comments on commit efc74f6

Please sign in to comment.