diff options
author | Brandt Bucher <brandt@python.org> | 2021-04-08 19:54:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 19:54:34 (GMT) |
commit | d92c59f48680122ce0e4d1ccf69d92b983e8db01 (patch) | |
tree | 439083fc302e91d4f4819425cbb5a0635f493b48 /Lib/dataclasses.py | |
parent | 28d28e053db6b69d91c2dfd579207cd8ccbc39e7 (diff) | |
download | cpython-d92c59f48680122ce0e4d1ccf69d92b983e8db01.zip cpython-d92c59f48680122ce0e4d1ccf69d92b983e8db01.tar.gz cpython-d92c59f48680122ce0e4d1ccf69d92b983e8db01.tar.bz2 |
bpo-43764: Fix `__match_args__` generation logic for dataclasses (GH-25284)
Diffstat (limited to 'Lib/dataclasses.py')
-rw-r--r-- | Lib/dataclasses.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py index afc4b82..ceda822 100644 --- a/Lib/dataclasses.py +++ b/Lib/dataclasses.py @@ -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) |