Skip to content

Conversation

Tik1993
Copy link

@Tik1993 Tik1993 commented Aug 31, 2025

update list_transcripts to list


try:
transcript_list = YouTubeTranscriptApi.list_transcripts(self.video_id)
transcript_list = YouTubeTranscriptApi.list(self.video_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change from YouTubeTranscriptApi.list_transcripts(self.video_id) to YouTubeTranscriptApi.list(self.video_id) may introduce breaking changes if this YouTube document loader is part of the public API. Modifying the underlying method call could break downstream consumers relying on specific behavior or error handling patterns of the list_transcripts method. Before implementing this change, verify that: 1) The list method provides identical functionality and error handling as list_transcripts, 2) The change maintains backward compatibility, and 3) This modification affects only internal implementation details rather than public interface dependencies.

Suggested change
transcript_list = YouTubeTranscriptApi.list(self.video_id)
transcript_list = YouTubeTranscriptApi.list_transcripts(self.video_id)

Spotted by Diamond (based on custom rule: Code quality)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the latest version of document, to list all transcripts which are available, it should use list() instead of list_transcripts


try:
transcript_list = YouTubeTranscriptApi.list_transcripts(self.video_id)
transcript_list = YouTubeTranscriptApi().list(self.video_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change introduces a breaking API modification. The code transitions from calling the static method YouTubeTranscriptApi.list_transcripts() to calling an instance method YouTubeTranscriptApi().list(). This alteration breaks backward compatibility by:

  1. Requiring instantiation of the YouTubeTranscriptApi class instead of static method access
  2. Changing the method name from list_transcripts to list

This modification could impact downstream code dependencies and any direct callers of this method. To maintain compatibility, either preserve the original static method call or document this as a breaking change with appropriate version increment.

Suggested change
transcript_list = YouTubeTranscriptApi().list(self.video_id)
transcript_list = YouTubeTranscriptApi.list_transcripts(self.video_id)

Spotted by Diamond (based on custom rule: Code quality)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant