Skip to content

Commit cab1232

Browse files
CopilotSigureMo
andcommitted
fix: resolve test import errors and align CONTRIBUTING.md comment spacing
Co-authored-by: SigureMo <38436475+SigureMo@users.noreply.github.com>
1 parent d5de9b4 commit cab1232

File tree

12 files changed

+20
-20
lines changed

12 files changed

+20
-20
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ uv run yutto -v
8282
│ │ ├── cli.py # 命令行解析
8383
│ │ └── settings.py # 设置相关
8484
│ ├── download_manager.py # 下载管理器
85-
│ ├── media # bilibili 自己的一些数据类型绑定
85+
│ ├── media # bilibili 自己的一些数据类型绑定
8686
│ │ ├── __init__.py
8787
│ │ ├── codec.py # bilibili 的 codec
8888
│ │ └── quality.py # bilibili 的 qn
@@ -103,7 +103,7 @@ uv run yutto -v
103103
│ │ ├── user_all_favourites.py # 全部收藏夹
104104
│ │ ├── user_all_ugc_videos.py # 个人空间全部
105105
│ │ └── user_watch_later.py # 稍后再看
106-
│ ├── downloader # 下载器相关模块
106+
│ ├── downloader # 下载器相关模块
107107
│ │ ├── __init__.py
108108
│ │ ├── downloader.py # 下载器
109109
│ │ ├── progressbar.py # 进度条(本部分可替换成为其他行为以支持更丰富的进度显示方式)
@@ -127,7 +127,7 @@ uv run yutto -v
127127
│ │ ├── ffmpeg.py # FFmpeg 驱动单例模块
128128
│ │ ├── file_buffer.py # 文件缓冲器(yutto 下载原理的核心)
129129
│ │ ├── filter.py # 数据过滤器(根据时间过滤选择的剧集)
130-
│ │ ├── functional # yutto 需要用的一些实用基本函数(很多是直接参考 StackOverflow 的)
130+
│ │ ├── functional # yutto 需要用的一些实用基本函数(很多是直接参考 StackOverflow 的)
131131
│ │ │ ├── __init__.py # 一些实用函数
132132
│ │ │ ├── async_object.py # 一个简单的抽象类
133133
│ │ │ ├── async_to_sync.py # 异步转同步

tests/test_api/test_bangumi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
import pytest
44

5-
from yutto._typing import BvId, CId, EpisodeId, MediaId, SeasonId
65
from yutto.api.bangumi import (
76
get_bangumi_list,
87
get_bangumi_playurl,
98
get_bangumi_subtitles, # pyright: ignore[reportUnusedImport]
109
get_season_id_by_episode_id,
1110
get_season_id_by_media_id,
1211
)
12+
from yutto.types import BvId, CId, EpisodeId, MediaId, SeasonId
1313
from yutto.utils.fetcher import FetcherContext, create_client
14-
from yutto.utils.funcutils import as_sync
14+
from yutto.utils.functional import as_sync
1515

1616

1717
@pytest.mark.api

tests/test_api/test_cheese.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
import pytest
44

5-
from yutto._typing import AId, AudioUrlMeta, CId, EpisodeId, SeasonId, VideoUrlMeta
65
from yutto.api.cheese import (
76
get_cheese_list,
87
get_cheese_playurl,
98
get_season_id_by_episode_id,
109
)
10+
from yutto.types import AId, AudioUrlMeta, CId, EpisodeId, SeasonId, VideoUrlMeta
1111
from yutto.utils.fetcher import FetcherContext, create_client
12-
from yutto.utils.funcutils import as_sync
12+
from yutto.utils.functional import as_sync
1313

1414

1515
@pytest.mark.api

tests/test_api/test_collection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import pytest
44

5-
from yutto._typing import BvId, MId, SeriesId
65
from yutto.api.collection import get_collection_details
6+
from yutto.types import BvId, MId, SeriesId
77
from yutto.utils.fetcher import FetcherContext, create_client
8-
from yutto.utils.funcutils import as_sync
8+
from yutto.utils.functional import as_sync
99

1010

1111
@pytest.mark.api

tests/test_api/test_danmaku.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import pytest
44

5-
from yutto._typing import AvId, CId
65
from yutto.api.danmaku import get_danmaku, get_protobuf_danmaku_segment, get_xml_danmaku
6+
from yutto.types import AvId, CId
77
from yutto.utils.fetcher import FetcherContext, create_client
8-
from yutto.utils.funcutils import as_sync
8+
from yutto.utils.functional import as_sync
99

1010

1111
@pytest.mark.api

tests/test_api/test_space.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import pytest
44

5-
from yutto._typing import AId, BvId, FId, MId, SeriesId
65
from yutto.api.space import (
76
get_all_favourites,
87
get_favourite_avids,
@@ -12,8 +11,9 @@
1211
get_user_name,
1312
get_user_space_all_videos_avids,
1413
)
14+
from yutto.types import AId, BvId, FId, MId, SeriesId
1515
from yutto.utils.fetcher import FetcherContext, create_client
16-
from yutto.utils.funcutils import as_sync
16+
from yutto.utils.functional import as_sync
1717

1818

1919
@pytest.mark.api

tests/test_api/test_ugc_video.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
import pytest
44

5-
from yutto._typing import AId, BvId, CId, EpisodeId
65
from yutto.api.ugc_video import (
76
get_ugc_video_info,
87
get_ugc_video_list,
98
get_ugc_video_playurl,
109
get_ugc_video_subtitles,
1110
)
11+
from yutto.types import AId, BvId, CId, EpisodeId
1212
from yutto.utils.fetcher import FetcherContext, create_client
13-
from yutto.utils.funcutils import as_sync
13+
from yutto.utils.functional import as_sync
1414

1515

1616
@pytest.mark.api

tests/test_api/test_user_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from yutto.api.user_info import get_user_info
66
from yutto.utils.fetcher import FetcherContext, create_client
7-
from yutto.utils.funcutils import as_sync
7+
from yutto.utils.functional import as_sync
88

99

1010
@pytest.mark.api

tests/test_processor/test_downloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from yutto.utils.asynclib import CoroutineWrapper
1010
from yutto.utils.fetcher import Fetcher, FetcherContext, create_client
1111
from yutto.utils.file_buffer import AsyncFileBuffer
12-
from yutto.utils.funcutils import as_sync
12+
from yutto.utils.functional import as_sync
1313

1414
from ..conftest import TEST_DIR
1515

tests/test_processor/test_path_resolver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from yutto.path_resolver import create_unique_path_resolver
5+
from yutto.path_templates import create_unique_path_resolver
66

77

88
@pytest.mark.processor

0 commit comments

Comments
 (0)