bpo-43764: Fix __match_args__ generation logic for dataclasses (GH-25284)

This commit is contained in:
Brandt Bucher 2021-04-08 12:54:34 -07:00 committed by GitHub
parent 28d28e053d
commit d92c59f486
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -1017,7 +1017,7 @@ def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen):
str(inspect.signature(cls)).replace(' -> NoneType', ''))
if '__match_args__' not in cls.__dict__:
cls.__match_args__ = tuple(f.name for f in flds if f.init)
cls.__match_args__ = tuple(f.name for f in field_list if f.init)
abc.update_abstractmethods(cls)