Skip to content

Attribute failures from 'is_used' property #40

Description

@robinklaassen

There is something seriously wrong with the below code in Base, all our use of pycgmes is failing after #38. Still investigating further.

    @staticmethod
    def get_extra_prop(field: Field, prop: str) -> Any:
        # The field is defined as a pydantic field, not a dataclass field,
        # so access to metadata is a tad different. Furthermore, pyright is confused by extra.
>       return field.default.json_schema_extra[prop]  # pyright: ignore[reportAttributeAccessIssue]
E       KeyError: 'is_used'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions