function annotation raise "ValueError: Function has keyword-only arguments or annotations, use getfullargspec() API which can support them"
Bug #1597218 reported by
Valérian Rousset
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cliff |
New
|
Undecided
|
Unassigned |
Bug Description
Python3 introduce (in PEP 3107) the function annotation concept, meaning that one can add information to a function declaration, which can be for example, be use to add types (as in PEP 484).
```
def f(s: str) -> None:
pass
```
means that a it is a function taking a `str` and returning nothing.
Cliff fail if a function has ones, because it is using `inspect.
I'm attaching a patch to resolve it.
To post a comment you must log in.