Skip to content

Commit

Permalink
Update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Mar 18, 2024
1 parent acc1ba0 commit ce587bf
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-docstring-first
- id: check-merge-conflict
Expand Down
4 changes: 2 additions & 2 deletions safe_cli/operators/hw_wallets/hw_wallet_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ def __init__(self):
from .ledger_wallet import LedgerWallet

self.supported_hw_wallet_types[HwWalletType.LEDGER] = LedgerWallet
except (ImportError):
except ImportError:
pass

try:
from .trezor_wallet import TrezorWallet

self.supported_hw_wallet_types[HwWalletType.TREZOR] = TrezorWallet
except (ImportError):
except ImportError:
pass

def is_supported_hw_wallet(self, hw_wallet_type: HwWalletType) -> bool:
Expand Down
10 changes: 6 additions & 4 deletions safe_cli/operators/safe_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ def is_version_updated(self) -> bool:
safe_contract_version = Safe(
last_safe_contract_address, self.ethereum_client
).retrieve_version()
except BadFunctionCallOutput: # Safe master copy is not deployed or errored, maybe custom network
except (
BadFunctionCallOutput
): # Safe master copy is not deployed or errored, maybe custom network
return True # We cannot say you are not updated ¯\_(ツ)_/¯

return semantic_version.parse(
Expand Down Expand Up @@ -1047,9 +1049,9 @@ def get_signers(self) -> Tuple[List[LocalAccount], List[HwWallet]]:
"""
permitted_signers = self.get_permitted_signers()
threshold = self.safe_cli_info.threshold
eoa_signers: List[
Account
] = [] # Some accounts that are not an owner can be loaded
eoa_signers: List[Account] = (
[]
) # Some accounts that are not an owner can be loaded
for account in self.accounts:
if account.address in permitted_signers:
eoa_signers.append(account)
Expand Down
1 change: 1 addition & 0 deletions safe_cli/safe_addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
https://github.com/gnosis/safe-deployments/tree/main/src/assets/v1.4.1
https://github.com/gnosis/safe-deployments/tree/main/src/assets/v1.3.0
"""

from typing import Sequence

from eth_typing import ChecksumAddress
Expand Down
8 changes: 5 additions & 3 deletions tests/mocks/multisig_tx_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ def json(self):
"submissionDate": "2023-02-28T20:18:24Z",
"modified": "2023-02-28T20:18:24Z",
"blockNumber": 8573938,
"transactionHash": "0x7d229cdd1a197acdd23787cedcb7ec4d746ce0e730dff75e209359894af7fb52"
if self.executed
else None,
"transactionHash": (
"0x7d229cdd1a197acdd23787cedcb7ec4d746ce0e730dff75e209359894af7fb52"
if self.executed
else None
),
"safeTxHash": "0xeb5fa8e85dd530397172da07792c5d05dff9ffe5816fc0a260d672e924825b01",
"proposer": None,
"executor": "0x5aC255889882aCd3da2aA939679E3f3d4cea221e",
Expand Down

0 comments on commit ce587bf

Please sign in to comment.