Convert core/indexes/base.py to f-strings
@topper-123 need to xref #29547 so @MomIsBestFriend can maintain to-do list I've renamed self.__class__ to type(self).

I'm not sure I agree with a policy of strictly requiring ``repr`` in f-string. f-strings and str.format have their own formatting mini-language with lots of other options than just !r, and !r is not an unusual modifer itself. > I'm not sure I agree with a policy of strictly requiring `repr` in f-string. f-strings and str.format have their own formatting mini-language with lots of other options than just !r, and !r is not an unusual modifer itself.

I agree. !r is more concise and would be my choice, but we should be consistent. @topper-123 looks like a merge conflict - can you merge master?

> I'm not sure I agree with a policy of strictly requiring `repr` in f-string. f-strings and str.format have their own formatting mini-language with lots of other options than just !r, and !r is not an unusual modifer itself.

Not a strong opinion but I do find `{repr(some_var)}` clearer than `{some_var!r}`. I always know what `repr` does don't always remember the format language specs. Ditto for `{str(some_var)}` versus `{some_var!s}`