Skip to content

Commit ab5d43b

Browse files
eendebakptpicnixz
andauthored
Apply suggestions from code review
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 07a4ee3 commit ab5d43b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/dataclasses.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def __repr__(self):
207207
# The name of an attribute on the class where we store the Field
208208
# objects. Also used to check if a class is a Data Class.
209209
_FIELDS = '__dataclass_fields__'
210-
# The name of an attribute on the class where we store the field names
210+
# The name of an attribute on the class where we store the field names.
211211
_FIELD_NAMES = '__dataclass_field_names__'
212212

213213
# The name of an attribute on the class that stores the parameters to
@@ -1054,7 +1054,8 @@ def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen,
10541054
# Remember all of the fields on our class (including bases). This
10551055
# also marks this class as being a dataclass.
10561056
setattr(cls, _FIELDS, fields)
1057-
setattr(cls, _FIELD_NAMES, tuple(f.name for f in fields.values() if f._field_type is _FIELD))
1057+
setattr(cls, _FIELD_NAMES, tuple(f.name for f in fields.values()
1058+
if f._field_type is _FIELD))
10581059

10591060
# Was this class defined with an explicit __hash__? Note that if
10601061
# __eq__ is defined in this class, then python will automatically

0 commit comments

Comments
 (0)