diff --git a/brownie/network/account.py b/brownie/network/account.py index ff41c5ba0..26d157e1f 100644 --- a/brownie/network/account.py +++ b/brownie/network/account.py @@ -90,7 +90,9 @@ def __contains__(self, address: str) -> bool: return False def __repr__(self) -> str: - return str(self._accounts) + if CONFIG.argv["cli"] == "console": + return str(self._accounts) + return super().__repr__() def __iter__(self) -> Iterator: return iter(self._accounts) diff --git a/brownie/network/contract.py b/brownie/network/contract.py index b5b09c521..63b44b03a 100644 --- a/brownie/network/contract.py +++ b/brownie/network/contract.py @@ -122,7 +122,9 @@ def __len__(self) -> int: return len(self._contracts) def __repr__(self) -> str: - return str(self._contracts) + if CONFIG.argv["cli"] == "console": + return str(self._contracts) + return super().__repr__() def _reset(self) -> None: for contract in self._contracts: diff --git a/brownie/network/rpc.py b/brownie/network/rpc.py index 9f56447ba..ac7eaf9ae 100644 --- a/brownie/network/rpc.py +++ b/brownie/network/rpc.py @@ -113,7 +113,7 @@ def launch(self, cmd: str, **kwargs: Dict) -> None: f'"{key}" with value "{value}".', InvalidArgumentWarning, ) - print(f"Launching '{' '.join(cmd_list)}'...") + print(f"\nLaunching '{' '.join(cmd_list)}'...") out = DEVNULL if sys.platform == "win32" else PIPE self._rpc = psutil.Popen(cmd_list, stdin=DEVNULL, stdout=out, stderr=out) # check that web3 can connect diff --git a/brownie/network/state.py b/brownie/network/state.py index 1260e0c3f..e920a5261 100644 --- a/brownie/network/state.py +++ b/brownie/network/state.py @@ -40,7 +40,9 @@ def __init__(self) -> None: _revert_register(self) def __repr__(self) -> str: - return str(self._list) + if CONFIG.argv["cli"] == "console": + return str(self._list) + return super().__repr__() def __bool__(self) -> bool: return bool(self._list)