Skip to content

Commit

Permalink
Add defaults to cmp_using stubs
Browse files Browse the repository at this point in the history
Fixes #1026
  • Loading branch information
hynek committed Sep 19, 2022
1 parent 95fde13 commit 2f20653
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions changelog.d/1027.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The type stubs for ``attrs.cmp_using()`` now have default values.
14 changes: 7 additions & 7 deletions src/attr/_cmp.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ from typing import Any, Callable, Optional, Type
_CompareWithType = Callable[[Any, Any], bool]

def cmp_using(
eq: Optional[_CompareWithType],
lt: Optional[_CompareWithType],
le: Optional[_CompareWithType],
gt: Optional[_CompareWithType],
ge: Optional[_CompareWithType],
require_same_type: bool,
class_name: str,
eq: Optional[_CompareWithType] = ...,
lt: Optional[_CompareWithType] = ...,
le: Optional[_CompareWithType] = ...,
gt: Optional[_CompareWithType] = ...,
ge: Optional[_CompareWithType] = ...,
require_same_type: bool = ...,
class_name: str = ...,
) -> Type: ...

0 comments on commit 2f20653

Please sign in to comment.