Add missing collect_by_mro to typing stubs

Fixes #711
This commit is contained in:
Hynek Schlawack 2020-11-03 10:05:33 +01:00
parent 48157a5741
commit 56c73081c5
3 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1 @@
The type stubs for ``attr.s()`` and ``attr.make_class()`` are not missing the *collect_by_mro* argument anymore.

View File

@ -273,6 +273,7 @@ def attrs(
eq: Optional[bool] = ...,
order: Optional[bool] = ...,
auto_detect: bool = ...,
collect_by_mro = ...,
getstate_setstate: Optional[bool] = ...,
on_setattr: Optional[_OnSetAttrArgType] = ...,
field_transformer: Optional[_FieldTransformer] = ...,
@ -297,6 +298,7 @@ def attrs(
eq: Optional[bool] = ...,
order: Optional[bool] = ...,
auto_detect: bool = ...,
collect_by_mro = ...,
getstate_setstate: Optional[bool] = ...,
on_setattr: Optional[_OnSetAttrArgType] = ...,
field_transformer: Optional[_FieldTransformer] = ...,
@ -386,6 +388,7 @@ def make_class(
auto_exc: bool = ...,
eq: Optional[bool] = ...,
order: Optional[bool] = ...,
collect_by_mro = ...,
on_setattr: Optional[_OnSetAttrArgType] = ...,
field_transformer: Optional[_FieldTransformer] = ...,
) -> type: ...

View File

@ -244,3 +244,8 @@ class NGFrozen:
# XXX: needs support in mypy
# ngf = NGFrozen(1)
@attr.s(collect_by_mro=True)
class MRO:
pass