Skip to content

Commit b9f35eb

Browse files
authored
Fix minor stub issues (#1072)
1 parent 4ad4ea0 commit b9f35eb

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/attr/__init__.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ _T = TypeVar("_T")
4848
_C = TypeVar("_C", bound=type)
4949

5050
_EqOrderType = Union[bool, Callable[[Any], Any]]
51-
_ValidatorType = Callable[[Any, Attribute[_T], _T], Any]
51+
_ValidatorType = Callable[[Any, "Attribute[_T]", _T], Any]
5252
_ConverterType = Callable[[Any], Any]
53-
_FilterType = Callable[[Attribute[_T], _T], bool]
53+
_FilterType = Callable[["Attribute[_T]", _T], bool]
5454
_ReprType = Callable[[Any], str]
5555
_ReprArgType = Union[bool, _ReprType]
56-
_OnSetAttrType = Callable[[Any, Attribute[Any], Any], Any]
56+
_OnSetAttrType = Callable[[Any, "Attribute[Any]", Any], Any]
5757
_OnSetAttrArgType = Union[
5858
_OnSetAttrType, List[_OnSetAttrType], setters._NoOpType
5959
]
6060
_FieldTransformer = Callable[
61-
[type, List[Attribute[Any]]], List[Attribute[Any]]
61+
[type, List["Attribute[Any]"]], List["Attribute[Any]"]
6262
]
6363
# FIXME: in reality, if multiple validators are passed they must be in a list
6464
# or tuple, but those are invariant and so would prevent subtypes of

src/attr/converters.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Callable, Optional, TypeVar, overload
1+
from typing import Callable, TypeVar, overload
22

33
from . import _ConverterType
44

src/attr/setters.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, NewType, NoReturn, TypeVar, cast
1+
from typing import Any, NewType, NoReturn, TypeVar
22

33
from . import Attribute, _OnSetAttrType
44

0 commit comments

Comments
 (0)