chrisyxlee, TIL in my #python #mypy adventures, the proper way to set up a class that returns itself is to use the
Self
typing annotation and return values by callingself.__class__
on the new valuefrom typing import Self class ImActuallyAString(str): def one_longer(self) -> Self: return self.__class__(self + "one")
ᕕ( ᐛ )ᕗ (please tell me if I'm wrong lol)