Skip to content

Confusing Argument Naming in participant.py #127

@Liamazing

Description

@Liamazing

Just spent a little while debugging an issue and root causing it to what I think is a confusing argument name, though forgive me that I do not have a broad understanding of the codebase.

The signature of LocalParticipant.unpublish_track follows:

    async def unpublish_track(self, track_sid: str) -> None:

Given this signature, I was under the impression that I would want to use the sid of the track supplied to the corresponding call to LocalParticipant.publish_track. As it turns out, it is not the Track.sid that satisfies this argument, but the TrackPublication.sid. In fact, the Track.sid and TrackPublication.track.sid will both be TR_unknown, which is not useful. Perhaps there would be a minor improvement in readability with track_publication_sid instead of track_sid as the argument name?

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