hikari.internal.reflect#

Reflection utilities.

Module Contents#

hikari.internal.reflect.resolve_signature(func)[source]#

Get the inspect.Signature of func with resolved forward annotations.

Warning

This will use eval to resolve string type-hints and forward references. This has a slight performance overhead, so attempt to cache this info as much as possible.

Parameters:
functyping.Callable[…, typing.Any]

The function to get the resolved annotations from.

Returns:
inspect.Signature

A inspect.Signature object with all forward reference annotations resolved.