Skip to content

Improvement: WestCommandsType should be a class #959

Description

@nmunnich

See #920 (comment)

Actually, would it be simpler and clearer to just promote WestCommandsType to some very basic but actual Python class?

I did consider this, and gave it a brief try, but it felt like a much more invasive refactoring than I was comfortable doing, and that would further explode the size of this #920 PR (which as you said has evolved quite a bit). It most likely should have been a class from the very start tbh - _west_commands_list feels like a constructor, _west_commands_maybe_delist feels like a string representation, _west_commands_merge would be an elegant iadd....

Make sure to include the _west_commands_manifest_dirs in the class somehow - it could be that a subclass of dict would be most suitable for WestCommandsType.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions