Skip to content

Support for type annotations in curried #29

@mdowds

Description

@mdowds

Hi, first thanks to everyone for continuing to maintain this library.

Currently when trying to use the curried decorator on a function with type annotations the following error is raised:
Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Python35\lib\inspect.py", line 1045, in getargspec raise ValueError("Function has keyword-only arguments or annotations" ValueError: Function has keyword-only arguments or annotations, use getfullargspec() API which can support them

Swapping out getargspec() in curried for getfullargspec() does fix the issue and I'm happy to submit a PR with the change, but I'm not sure how best to write a test as type annotations are a Python3-only feature, as are keyword-only arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions