src/orion/core/io/interactive_commands/branching_prompt.py
def _complete_dim(self, conflict_types, text, line, begidx, endidx):
        """Auto-complete addition or deletion of new, changed or missing dimensions"""
        potential_conflicts = self.branch_builder.conflicts.get_remaining(
            conflict_types
        )

        names = [
            conflict.dimension.name.lstrip("/") for conflict in potential_conflicts
        ]

        if len(line.split(" ")) == 2:
            return self._get_completions(names, text)

        # Dimension name is fully specified in command line
        names = [name for name in names if name == line.split(" ")[1]]
        if not names:
            return []
        name = names[0]

        potential_conflicts = [
            conflict
            for conflict in potential_conflicts
            if conflict.dimension.name.lstrip("/") == name
        ]
        if not potential_conflicts:
            return []
        conflict = potential_conflicts[0]

        if isinstance(
            conflict,
            (conflicts.NewDimensionConflict, conflicts.MissingDimensionConflict),
        ):
            return self._complete_add_new_or_missing(
                conflict, text, line, begidx, endidx
            )
        else:
            return self._complete_add_changed(conflict, text, line, begidx, endidx)
Auto-complete addition or deletion of new, changed or missing dimensions
Auto-complete addition or deletion of new, changed or missing dimensions
Auto - complete addition or deletion of new changed or missing dimensions
def _complete_dim(self, conflict_types, text, line, begidx, endidx):
        potential_conflicts = self.branch_builder.conflicts.get_remaining(
            conflict_types
        )
        names = [
            conflict.dimension.name.lstrip("/") for conflict in potential_conflicts
        ]
        if len(line.split(" ")) == 2:
            return self._get_completions(names, text)
        names = [name for name in names if name == line.split(" ")[1]]
        if not names:
            return []
        name = names[0]
        potential_conflicts = [
            conflict
            for conflict in potential_conflicts
            if conflict.dimension.name.lstrip("/") == name
        ]
        if not potential_conflicts:
            return []
        conflict = potential_conflicts[0]
        if isinstance(
            conflict,
            (conflicts.NewDimensionConflict, conflicts.MissingDimensionConflict),
        ):
            return self._complete_add_new_or_missing(
                conflict, text, line, begidx, endidx
            )
        else:
            return self._complete_add_changed(conflict, text, line, begidx, endidx)
def _complete_dim ( self , conflict_types , text , line , begidx , endidx ) : potential_conflicts = self . branch_builder . conflicts . get_remaining ( conflict_types ) names = [ conflict . dimension . name . lstrip ( "/" ) for conflict in potential_conflicts ] if len ( line . split ( " " ) ) == 2 : return self . _get_completions ( names , text ) names = [ name for name in names if name == line . split ( " " ) [ 1 ] ] if not names : return [ ] name = names [ 0 ] potential_conflicts = [ conflict for conflict in potential_conflicts if conflict . dimension . name . lstrip ( "/" ) == name ] if not potential_conflicts : return [ ] conflict = potential_conflicts [ 0 ] if isinstance ( conflict , ( conflicts . NewDimensionConflict , conflicts . MissingDimensionConflict ) , ) : return self . _complete_add_new_or_missing ( conflict , text , line , begidx , endidx ) else : return self . _complete_add_changed ( conflict , text , line , begidx , endidx )
Auto-complete addition or deletion of new, changed or missing dimensions
Auto - complete addition or deletion of new changed or missing dimensions
"""Auto-complete addition or deletion of new, changed or missing dimensions""" # Dimension name is fully specified in command line
self
conflict_types
text
line
begidx
endidx