@@ -284,7 +284,7 @@ def __repr__(self):
284
284
285
285
# This is used to support the PEP 487 __set_name__ protocol in the
286
286
# case where we're using a field that contains a descriptor as a
287
- # defaul value. For details on __set_name__, see
287
+ # default value. For details on __set_name__, see
288
288
# https://www.python.org/dev/peps/pep-0487/#implementation-details.
289
289
#
290
290
# Note that in _process_class, this Field object is overwritten
@@ -680,7 +680,7 @@ def _get_field(cls, a_name, a_type):
680
680
# In addition to checking for actual types here, also check for
681
681
# string annotations. get_type_hints() won't always work for us
682
682
# (see https://github.com/python/typing/issues/508 for example),
683
- # plus it's expensive and would require an eval for every stirng
683
+ # plus it's expensive and would require an eval for every string
684
684
# annotation. So, make a best effort to see if this is a ClassVar
685
685
# or InitVar using regex's and checking that the thing referenced
686
686
# is actually of the correct type.
@@ -1148,7 +1148,7 @@ class C(Base):
1148
1148
raise TypeError (f"Invalid field: { item !r} " )
1149
1149
1150
1150
if not isinstance (name , str ) or not name .isidentifier ():
1151
- raise TypeError (f"Field names must be valid identifers : { name !r} " )
1151
+ raise TypeError (f"Field names must be valid identifiers : { name !r} " )
1152
1152
if keyword .iskeyword (name ):
1153
1153
raise TypeError (f"Field names must not be keywords: { name !r} " )
1154
1154
if name in seen :
0 commit comments