On Python 3.7, if you mark a parameter POSITIONAL_ONLY, it will generate
a signature that uses the positional-only `/` syntax, *even though*
Python 3.7 cannot parse that syntax (it was added in Python 3.8, PEP 570).
POSITIONAL_OR_KEYWORD avoids that problem, and is probably more accurate
anyway.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>
def signature(self) -> inspect.Signature:
parameters = [
- inspect.Parameter('self', inspect.Parameter.POSITIONAL_ONLY),
+ inspect.Parameter('self', inspect.Parameter.POSITIONAL_OR_KEYWORD),
*self._required_params,
*self._optional_params,
]