|
3 | 3 | import logging
|
4 | 4 | from collections.abc import Generator
|
5 | 5 | from datetime import timedelta
|
6 |
| -from typing import Optional |
7 | 6 |
|
8 | 7 | import googleapiclient.errors
|
9 | 8 | import requests
|
@@ -351,7 +350,7 @@ def validate_channel_configs(channel_configs: dict) -> list[str]:
|
351 | 350 | return errors
|
352 | 351 |
|
353 | 352 |
|
354 |
| -def get_youtube_channel_configs(*, channel_ids: Optional[str] = None) -> list[dict]: |
| 353 | +def get_youtube_channel_configs(*, channel_ids: str | None = None) -> list[dict]: |
355 | 354 | """
|
356 | 355 | Fetch youtube channel configs from github
|
357 | 356 |
|
@@ -382,7 +381,7 @@ def get_youtube_channel_configs(*, channel_ids: Optional[str] = None) -> list[di
|
382 | 381 | return channel_configs
|
383 | 382 |
|
384 | 383 |
|
385 |
| -def extract(*, channel_ids: Optional[str] = None) -> Generator[tuple, None, None]: |
| 384 | +def extract(*, channel_ids: str | None = None) -> Generator[tuple, None, None]: |
386 | 385 | """
|
387 | 386 | Return video data for all videos in channels' playlists
|
388 | 387 |
|
@@ -496,8 +495,8 @@ def transform(extracted_channels: iter) -> Generator[dict, None, None]:
|
496 | 495 |
|
497 | 496 | def get_youtube_videos_for_transcripts_job(
|
498 | 497 | *,
|
499 |
| - created_after: Optional[str] = None, |
500 |
| - created_minutes: Optional[str] = None, |
| 498 | + created_after: str | None = None, |
| 499 | + created_minutes: str | None = None, |
501 | 500 | overwrite: bool = False,
|
502 | 501 | ) -> list[LearningResource]:
|
503 | 502 | """
|
|
0 commit comments