Skip to content

Update transformation_documentation_wrapper to use MRO #3335

@sergisiso

Description

@sergisiso

The main reason is all of the code is assume to rely on the presence of cls.apply when doing things such as inheriting the docstirng and generating the docstring for the validate function.

I'd also assumed it was needed for get_valid_options but I was smarter when coding that and it in fact uses the mro to find all of the apply methods in the hierarchy and skips over those that don't have one.

This is a flaw with the transformation_documentation_wrapper then - we could do better and only update apply if its on cls, and update validate according to the first apply method we find looping up the mro (similar to psyGen.py::2751-2754). I'm happy to fix this up soon if you'd like as I think it could be a relatively small task - if so can you open an issue and I'll also add a TODO to remove this apply method once that issue is resolved?

Originally posted by @LonelyCat124 in #3205 (comment)

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