pydistsim.utils.helpers.with_typehint

with_typehint(baseclass: type[T]) type[T][source]

Useful function to make mixins with baseclass typehint without actually inheriting from it.

Parameters:

baseclass (type[T]) – The base class to use as a type hint.

Returns:

The base class if TYPE_CHECKING is True, otherwise object.

Return type:

type[T]