From 2de253d10d3288fccaaa08195b29f543b56b3f15 Mon Sep 17 00:00:00 2001 From: doggie <3859395+fubuloubu@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:39:06 -0400 Subject: [PATCH] fix: update typing again --- ape_safe/accounts.py | 4 ++-- ape_safe/client/base.py | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ape_safe/accounts.py b/ape_safe/accounts.py index 5f9a0bc..873ea6a 100644 --- a/ape_safe/accounts.py +++ b/ape_safe/accounts.py @@ -40,7 +40,7 @@ class SafeContainer(AccountContainerAPI): - _accounts: Dict[str, "SafeAccount"] = {} + _accounts: dict[str, "SafeAccount"] = {} @property def _account_files(self) -> Iterator[Path]: @@ -182,7 +182,7 @@ def get_signatures( safe_tx_hash: str, signers: Iterable[AccountAPI], ) -> dict[AddressType, MessageSignature]: - signatures: Dict[AddressType, MessageSignature] = {} + signatures: dict[AddressType, MessageSignature] = {} for signer in signers: message = encode_defunct(hexstr=safe_tx_hash) signature = signer.sign_message(message) diff --git a/ape_safe/client/base.py b/ape_safe/client/base.py index 196b0a7..2a7bbe1 100644 --- a/ape_safe/client/base.py +++ b/ape_safe/client/base.py @@ -1,8 +1,7 @@ import time from abc import ABC, abstractmethod -from collections.abc import Iterator from functools import cached_property -from typing import Iterator, Optional, Set, Union +from typing import Iterator, Optional, Union import certifi import requests @@ -143,13 +142,13 @@ def session(self) -> requests.Session: session.mount("https://", adapter) return session - def _get(self, url: str, params: Optional[Dict] = None) -> Response: + def _get(self, url: str, params: Optional[dict] = None) -> Response: return self._request("GET", url, params=params) def _post(self, url: str, json: Optional[dict] = None, **kwargs) -> Response: return self._request("POST", url, json=json, **kwargs) - def _delete(self, url: str, json: Optional[Dict] = None, **kwargs) -> Response: + def _delete(self, url: str, json: Optional[dict] = None, **kwargs) -> Response: return self._request("DELETE", url, json=json, **kwargs) @cached_property