From cb8e06e43ee607c0ac56a9f095ff8b2aa0fe9b53 Mon Sep 17 00:00:00 2001 From: BobTheBuidler Date: Sun, 11 Feb 2024 23:19:11 +0000 Subject: [PATCH] Revert "chore: fix mypy errs" This reverts commit 8bd28f63801db7c463fd1286f77fa868d47c6d65. --- a_sync/_meta.py | 2 +- a_sync/_typing.py | 6 +++--- a_sync/abstract.py | 2 +- a_sync/modifiers/manager.py | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/a_sync/_meta.py b/a_sync/_meta.py index b20d479b..4607f388 100644 --- a/a_sync/_meta.py +++ b/a_sync/_meta.py @@ -5,7 +5,7 @@ from typing import Any, Dict, Tuple from a_sync import ENVIRONMENT_VARIABLES, _bound, modifiers -from a_sync.future import _ASyncFutureWrappedFn # type: ignore [attr-defined] +from a_sync.future import _ASyncFutureWrappedFn from a_sync.modified import ASyncFunction, Modified from a_sync.property import PropertyDescriptor diff --git a/a_sync/_typing.py b/a_sync/_typing.py index 8bb37984..b7846fbf 100644 --- a/a_sync/_typing.py +++ b/a_sync/_typing.py @@ -1,12 +1,12 @@ import asyncio -from _collections_abc import dict_keys, dict_values, dict_items from concurrent.futures._base import Executor from decimal import Decimal from typing import (TYPE_CHECKING, Any, AsyncIterable, AsyncIterator, Awaitable, Callable, DefaultDict, Deque, Dict, Generator, Generic, - Iterable, Iterator, List, Literal, Optional, Protocol, Set, - Tuple, Type, TypedDict, TypeVar, Union, final, overload) + ItemsView, Iterable, Iterator, KeysView, List, Literal, + Optional, Protocol, Set, Tuple, Type, TypedDict, TypeVar, + Union, ValuesView, final, overload) from typing_extensions import Concatenate, ParamSpec, Self, Unpack diff --git a/a_sync/abstract.py b/a_sync/abstract.py index b54f004c..c7566df7 100644 --- a/a_sync/abstract.py +++ b/a_sync/abstract.py @@ -69,5 +69,5 @@ def __a_sync_flag_value__(self) -> bool: pass @abc.abstractclassmethod # type: ignore [arg-type, misc] - def __a_sync_default_mode__(cls) -> bool: # type: ignore [empty-body] + def __a_sync_default_mode__(cls) -> bool: pass \ No newline at end of file diff --git a/a_sync/modifiers/manager.py b/a_sync/modifiers/manager.py index 69efaf7d..97f9ec3f 100644 --- a/a_sync/modifiers/manager.py +++ b/a_sync/modifiers/manager.py @@ -70,11 +70,11 @@ def sync_modifier_wrap(*args: P.args, **kwargs: P.kwargs) -> T: return sync_modifier_wrap # Dictionary api - def items(self) -> dict_items[str, Any]: + def items(self) -> ItemsView[str, Any]: return self._modifiers.items() - def keys(self) -> dict_keys[str]: + def keys(self) -> KeysView[str]: return self._modifiers.keys() - def values(self) -> dict_values[Any]: + def values(self) -> ValuesView[Any]: return self._modifiers.values() def __contains__(self, key: str) -> bool: # type: ignore [override] return key in self._modifiers