Based on the docstring and implementation of get_type_hints, the first arg is supposed to be a type, i.e., get_type_hints(B) instead of get_type_hints(b).
get_type_hints
type
get_type_hints(B)
get_type_hints(b)