docs: clarify docstring punctuation style (#6121)

This commit is contained in:
InfinityPacer
2026-07-15 16:01:47 +08:00
committed by GitHub
parent 077241b6ed
commit 00d46f3aab
+4 -2
View File
@@ -10,6 +10,8 @@ All **public classes**, **public methods**, and **public functions** in this pro
## Docstring Format ## Docstring Format
Short, label-style docstrings should follow the surrounding code style and must not gain a period mechanically. Complete sentences that explain non-obvious behavior should use normal Chinese punctuation.
### Single-line (for simple, obvious descriptions) ### Single-line (for simple, obvious descriptions)
```python ```python
@@ -28,7 +30,7 @@ def download(
download_dir: Path, download_dir: Path,
) -> Optional[str]: ) -> Optional[str]:
""" """
添加下载任务到下载器 添加下载任务到下载器
:param context: 当前媒体上下文,包含识别结果和种子选择信息 :param context: 当前媒体上下文,包含识别结果和种子选择信息
:param torrent: 要下载的种子信息 :param torrent: 要下载的种子信息
@@ -43,7 +45,7 @@ def download(
```python ```python
class DownloadChain(ChainBase): class DownloadChain(ChainBase):
""" """
下载处理链,负责协调搜索结果的种子选择、下载器调度和下载后处理 下载处理链,负责协调搜索结果的种子选择、下载器调度和下载后处理
""" """
``` ```