Skip to content

Commit

Permalink
Mark setters.frozen as NoReturn
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Jul 14, 2020
1 parent 086fe20 commit 77b5828
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/attr/setters.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from . import _OnSetAttrType, Attribute
from typing import TypeVar, Any, NewType, cast
from typing import TypeVar, Any, NewType, NoReturn, cast

_T = TypeVar("_T")

def frozen(
instance: Any, attribute: Attribute, new_value: Any
) -> NoReturn: ...
def pipe(*setters: _OnSetAttrType) -> _OnSetAttrType: ...
def frozen(instance: Any, attribute: Attribute, new_value: Any) -> Any: ...
def validate(instance: Any, attribute: Attribute, new_value: _T) -> _T: ...
def convert(instance: Any, attribute: Attribute, new_value: _T) -> _T: ...

Expand Down

0 comments on commit 77b5828

Please sign in to comment.