Skip to content

Rename Model.contents to Model.content as it may be a single value, while "conte... #236

@github-actions

Description

@github-actions

implies a countable collection of values

# TODO: Rename Model.contents to Model.content as it may be a single value, while "contents"

        value = parse_none_according_to_model(value, root_model=cls)

        config = cls.data_class_creator.config
        with hold_and_reset_prev_attrib_value(config.model,
                                              'dynamically_convert_elements_to_models'):
            config.model.dynamically_convert_elements_to_models = False
            return {ROOT_KEY: cls._parse_data(value)}

    # TODO: Rename Model.contents to Model.content as it may be a single value, while "contents"
    #       implies a countable collection of values
    @property
    def contents(self) -> _RootT:
        return cast(_RootT, self.__dict__.get(ROOT_KEY))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions