You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E {
E "name": "funcdef_7_posonly_args",
E "location": null,
E "docstring": null,
E "members": [
E {
E "name": "func1",
E "location": null,
E "docstring": null,
E "modifiers": null,
E "args": [
E {
E "name": "x",
E - "type": "POSITIONAL"
E + "type": "POSITIONAL_ONLY"
E ? +++++
E },
E {
E "name": "y",
E - "type": "POSITIONAL",
E + "type": "POSITIONAL_ONLY",
E ? +++++
E "default_value": "3"
E - },
E - {
E - "name": "/",
E - "type": "POSITIONAL"
E },
E {
E "name": "z",
E "type": "POSITIONAL",
E "default_value": "5"
E },
E {
E "name": "w",
E "type": "POSITIONAL",
E "default_value": "7"
E }
E ],
E "return_type": null,
E "decorations": [],
E "type": "function"
E },
E {
E "name": "func2",
E "location": null,
E "docstring": null,
E "modifiers": null,
E "args": [
E {
E "name": "x",
E - "type": "POSITIONAL"
E + "type": "POSITIONAL_ONLY"
E ? +++++
E - },
E - {
E - "name": "/",
E - "type": "POSITIONAL"
E },
E {
E "name": "v",
E "type": "POSITIONAL_REMAINDER"
E },
E {
E "name": "a",
E "type": "KEYWORD_ONLY",
E "default_value": "1"
E },
E {
E "name": "b",
E "type": "KEYWORD_ONLY",
E "default_value": "2"
E }
E ],
E "return_type": null,
E "decorations": [],
E "type": "function"
E },
E {
E "name": "func3",
E "location": null,
E "docstring": null,
E "modifiers": null,
E "args": [
E {
E "name": "x",
E - "type": "POSITIONAL"
E + "type": "POSITIONAL_ONLY"
E ? +++++
E - },
E - {
E - "name": "/",
E - "type": "POSITIONAL"
E },
E {
E "name": "a",
E "type": "KEYWORD_ONLY",
E "default_value": "1"
E },
E {
E "name": "b",
E "type": "KEYWORD_ONLY",
E "default_value": "2"
E },
E {
E "name": "kwargs",
E "type": "KEYWORD_REMAINDER"
E }
E ],
E "return_type": null,
E "decorations": [],
E "type": "function"
E }
E ]
E }
Expected behavior
The expected behaviour would be to produce Argument with kind POSITIONAL_ONLY and do not have the extra / argument in the list.
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently,
docspec_python
does not create correctArgument
objects because it adds an argument like:and does not use the arguement kind
Argument.Type.PositionalOnly
.To Reproduce
Then run tests and see the diff:
Expected behavior
The expected behaviour would be to produce
Argument
with kindPOSITIONAL_ONLY
and do not have the extra/
argument in the list.The text was updated successfully, but these errors were encountered: