Skip to content

Commit

Permalink
Fix minor stub issues (#1072)
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Dec 20, 2022
1 parent 4ad4ea0 commit b9f35eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/attr/__init__.pyi
Expand Up @@ -48,17 +48,17 @@ _T = TypeVar("_T")
_C = TypeVar("_C", bound=type)

_EqOrderType = Union[bool, Callable[[Any], Any]]
_ValidatorType = Callable[[Any, Attribute[_T], _T], Any]
_ValidatorType = Callable[[Any, "Attribute[_T]", _T], Any]
_ConverterType = Callable[[Any], Any]
_FilterType = Callable[[Attribute[_T], _T], bool]
_FilterType = Callable[["Attribute[_T]", _T], bool]
_ReprType = Callable[[Any], str]
_ReprArgType = Union[bool, _ReprType]
_OnSetAttrType = Callable[[Any, Attribute[Any], Any], Any]
_OnSetAttrType = Callable[[Any, "Attribute[Any]", Any], Any]
_OnSetAttrArgType = Union[
_OnSetAttrType, List[_OnSetAttrType], setters._NoOpType
]
_FieldTransformer = Callable[
[type, List[Attribute[Any]]], List[Attribute[Any]]
[type, List["Attribute[Any]"]], List["Attribute[Any]"]
]
# FIXME: in reality, if multiple validators are passed they must be in a list
# or tuple, but those are invariant and so would prevent subtypes of
Expand Down
2 changes: 1 addition & 1 deletion src/attr/converters.pyi
@@ -1,4 +1,4 @@
from typing import Callable, Optional, TypeVar, overload
from typing import Callable, TypeVar, overload

from . import _ConverterType

Expand Down
2 changes: 1 addition & 1 deletion src/attr/setters.pyi
@@ -1,4 +1,4 @@
from typing import Any, NewType, NoReturn, TypeVar, cast
from typing import Any, NewType, NoReturn, TypeVar

from . import Attribute, _OnSetAttrType

Expand Down

0 comments on commit b9f35eb

Please sign in to comment.