@@ -3242,17 +3242,20 @@ def check_typeddict_inheritance(self, defn: ClassDef) -> None:
32423242 source = data .field_sources [field_name ]
32433243 if source .base is None :
32443244 self .fail (
3245- f'Definition of field "{ field_name } " incompatible with base class "{ base .name } "' ,
3245+ f'Definition of field "{ field_name } " incompatible with base class '
3246+ f'"{ base .name } "' ,
32463247 source .ctx ,
32473248 )
32483249 else :
32493250 self .fail (
3250- f'Incompatible definitions of field "{ field_name } " in base classes "{ base .name } " and "{ source .base .name } "' ,
3251+ f'Incompatible definitions of field "{ field_name } " in base classes '
3252+ f'"{ base .name } " and "{ source .base .name } "' ,
32513253 source .ctx ,
32523254 )
32533255 if field_name in td .readonly_keys :
32543256 self .note (
3255- f'This can be resolved by redeclaring the field "{ field_name } " with a mutually compatible type' ,
3257+ f'This can be resolved by redeclaring the field "{ field_name } " '
3258+ f"with a mutually compatible type" ,
32563259 source .ctx ,
32573260 )
32583261
@@ -6458,14 +6461,14 @@ def conditional_types_for_iterable(
64586461 elif key in bound .items and isinstance (
64596462 get_proper_type (bound .items [key ]), UninhabitedType
64606463 ):
6461- # If an item is explicitly declared uninhabited, we can exclude it from if_types;
6462- # see testOperatorContainsNarrowsTypedDicts_closed
6464+ # If an item is explicitly declared uninhabited, we can exclude it from
6465+ # if_types; see testOperatorContainsNarrowsTypedDicts_closed
64636466 else_types .append (possible_iterable_type )
64646467 elif key not in bound .items and (bound .is_closed or bound .is_final ):
6465- # If an item is missing and the type is closed, we can exclude it from if_types;
6466- # see testOperatorContainsNarrowsTypedDicts_closed
6467- # We also support "final" as a legacy way of expressing "closed" in this specific case;
6468- # see testOperatorContainsNarrowsTypedDicts_final
6468+ # If an item is missing and the type is closed, we can exclude it from
6469+ # if_types; see testOperatorContainsNarrowsTypedDicts_closed
6470+ # We also support "final" as a legacy way of expressing "closed" in this
6471+ # specific case; see testOperatorContainsNarrowsTypedDicts_final
64696472 else_types .append (possible_iterable_type )
64706473 else :
64716474 if_types .append (possible_iterable_type )
0 commit comments