mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-11-01 21:07:01 +08:00
Merge pull request #7050 from DDSRem-Dev/codex-comment-migration
docs: 统一全项目中文注释和结构化契约说明
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"""GitHub 授权 API 的应用服务依赖。"""
|
||||
"""
|
||||
GitHub 授权 API 的应用服务依赖。
|
||||
"""
|
||||
|
||||
from fastapi import Depends, HTTPException
|
||||
|
||||
@@ -11,7 +13,9 @@ from app.startup.composition.context import HostRuntime
|
||||
def get_github_auth_service(
|
||||
runtime: HostRuntime = Depends(get_host_runtime),
|
||||
) -> GithubAuthService:
|
||||
"""从宿主运行时取得已装配的 GitHub 授权应用服务。"""
|
||||
"""
|
||||
从宿主运行时取得已装配的 GitHub 授权应用服务。
|
||||
"""
|
||||
if runtime.system.github_auth is None:
|
||||
raise HTTPException(status_code=503, detail="GitHub 授权服务尚未初始化")
|
||||
return runtime.system.github_auth
|
||||
@@ -20,7 +24,9 @@ def get_github_auth_service(
|
||||
def get_community_medal_service(
|
||||
runtime: HostRuntime = Depends(get_host_runtime),
|
||||
) -> CommunityMedalService:
|
||||
"""复用实例启动装配的社区勋章服务,不在请求中构造网络客户端或缓存。"""
|
||||
"""
|
||||
复用实例启动装配的社区勋章服务,不在请求中构造网络客户端或缓存。
|
||||
"""
|
||||
if runtime.system.github_community is None:
|
||||
raise HTTPException(status_code=503, detail="社区勋章服务尚未初始化")
|
||||
return runtime.system.github_community
|
||||
|
||||
Reference in New Issue
Block a user