Skip to content

DynamicCore doesn't handle named only arguments properly #111

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
pekkaklarck opened this issue Feb 6, 2023 · 3 comments · Fixed by #112
Closed

DynamicCore doesn't handle named only arguments properly #111

pekkaklarck opened this issue Feb 6, 2023 · 3 comments · Fixed by #112

Comments

@pekkaklarck
Copy link
Member

For example, arg in this example isn't handled properly:

class Example(DynamicCore):
    def __init__(self):
        super().__init__([])

    @keyword
    def kw(self, *, arg):
        print(arg)

Libdoc reports arg as a normal argument, not as named-only as it should. Luckily execution like

Kw    arg=value

works as expected so named-only arguments aren't totally broken. Invalid usage like

Kw    value

isn't handled properly, though.

@pekkaklarck
Copy link
Member Author

This was initially submitted to Robot's tracker as robotframework/robotframework#4644.

@aaltat
Copy link
Contributor

aaltat commented Feb 14, 2023

So do I get it correctly that in the above case, PLC should return ['*', 'named']?

aaltat added a commit to aaltat/PythonLibCore that referenced this issue Feb 14, 2023
aaltat added a commit to aaltat/PythonLibCore that referenced this issue Feb 14, 2023
aaltat added a commit to aaltat/PythonLibCore that referenced this issue Feb 14, 2023
aaltat added a commit that referenced this issue Feb 14, 2023
@aaltat aaltat added this to the v4.1.1 milestone Feb 17, 2023
@aaltat
Copy link
Contributor

aaltat commented Feb 17, 2023

Add #117 tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants