Skip to content

Event 'autodoc-process-docstring' threw an exception (exception: unhashable type: 'ParamSpecArgs') #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spacemanspiff2007 opened this issue Jan 26, 2023 · 0 comments · Fixed by #319

Comments

@spacemanspiff2007
Copy link
Contributor

Autodoc 1.21.8 fails for a ParamSpec

HINT_CB_P = ParamSpec('HINT_CB_P')
HINT_CB: TypeAlias = Callable[HINT_CB_P, Any]


class MyClass):
    def func(self, callback: HINT_CB, *args: HINT_CB_P.args, **kwargs: HINT_CB_P.kwargs):
        pass

Error:

    if annotation in _TYPES_DICT:
TypeError: unhashable type: 'ParamSpecArgs'

hoodmane pushed a commit that referenced this issue Jan 27, 2023
Fixes #318. The access to `_TYPES_DICT` should be wrapped in a try block so that
if the type is unhashable the error can be caught and discarded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant