diff --git a/changelog.d/1027.change.rst b/changelog.d/1027.change.rst new file mode 100644 index 000000000..a546427ec --- /dev/null +++ b/changelog.d/1027.change.rst @@ -0,0 +1 @@ +The type stubs for ``attrs.cmp_using()`` now have default values. diff --git a/src/attr/_cmp.pyi b/src/attr/_cmp.pyi index 35437eff6..f3dcdc1a7 100644 --- a/src/attr/_cmp.pyi +++ b/src/attr/_cmp.pyi @@ -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: ...