Skip to content

Make t_start private on BaseRecordingSegment #4524

@h-mayorquin

Description

@h-mayorquin

BaseRecordingSegment.t_start is a public attribute, while BaseSortingSegment._t_start is private. This inconsistency was less visible when segments was a private attribute (_segments), but now that segments is a public property (added in #4462 for typing support), users can reach recording.segments[0].t_start directly. This bypasses the public time API (get_start_time, shift_times, set_times, reset_times) which is where all time manipulation should go through.

The same attribute is private on sorting segments (_t_start) and has always been. Making it _t_start on recording segments would make the two consistent and corral access through the public methods. I can take care of this as this will touch a couple of tests but I would like to hear what people think before.

@alejoe91 @JoeZiminski

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