Skip to content

error when decorating class with @keyword if the class contains an attribute with a type annotation #371

Description

@DetachHead
from pytest_robotframework import keyword


@keyword
class Foo:
    asdf: int = 1
[ ERROR ] Error in library 'foo': Adding keyword 'Foo' failed: Type information given to non-existing argument 'asdf'.

i don't think (or care whether) .robot files support classes decorated with @keyword, but it works when called from python code so it should be allowed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions