Skip to content

Enum is not supported by inspect.signature #44

Description

@albertvillanova

Enum is not supported by inspect.signature and raises a TypeError: unexpected object <bound method __signature__ of <aenum 'Enum'>> in __signature__ attribute

import inspect
from aenum import Enum

inspect.signature(Enum)
  File "/lib/python3.10/inspect.py", line 3254, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped,
  File "/lib/python3.10/inspect.py", line 3002, in from_callable
    return _signature_from_callable(obj, sigcls=cls,
  File "/lib/python3.10/inspect.py", line 2427, in _signature_from_callable
    raise TypeError(
TypeError: unexpected object <bound method __signature__ of <aenum 'Enum'>> in __signature__ attribute

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions