hikari.internal.reflect#
Reflection utilities.
Module Contents#
- hikari.internal.reflect.resolve_signature(func)[source]#
Get the
inspect.Signature
offunc
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:
- func
typing.Callable
[…,typing.Any
] The function to get the resolved annotations from.
- func
- Returns:
inspect.Signature
A
inspect.Signature
object with all forward reference annotations resolved.