pyright(basic 模式)从 15 errors / 10 warnings 降到 0/0: - pyproject: pythonPlatform="All"(termios/msvcrt 双平台分支不再误报), reportUnsupportedDunderAll=false(__init__ 惰性导出属正常写法) - keys.py: 捕获 sys.stdin 局部变量 + 提前返回,消除 fileno() 的 None 收窄告警 - server/app.py: lifespan 改用 @asynccontextmanager 并标注 AsyncIterator[None] - server/actions.py: 显式标注 result: dict[str, Any],消除 isinstance 冗余报错 - server/__main__.py: 用 importlib.util.find_spec 探测 websockets - tests/test_server.py: 同上,uvicorn 探测改为 find_spec - tools/preview_tui.py: TYPE_CHECKING 下引入 RemoteFarm,修正返回类型标注 - farm/tui.py: 取消未使用变量,统一 round/取整写法 其他: - README: 新增第 11 节「工程化:uv + ruff + pyright」,快速开始全部改用 uv sync / uv run;原第 11 节起顺延为 12 - requirements.txt: 由 uv export --no-dev --no-hashes 重新生成(锁定版本) - 清理临时日志文件 验收:ruff check 全通过 / ruff format 26 文件无改动 / pyright 0 错误 / unittest 97 项全部通过
57 lines
1.3 KiB
Plaintext
57 lines
1.3 KiB
Plaintext
# This file was autogenerated by uv via the following command:
|
|
# uv export --no-dev --no-hashes --output-file requirements.txt
|
|
annotated-doc==0.0.5
|
|
# via fastapi
|
|
annotated-types==0.8.0
|
|
# via pydantic
|
|
anyio==4.15.1
|
|
# via
|
|
# starlette
|
|
# watchfiles
|
|
click==8.5.0
|
|
# via uvicorn
|
|
exceptiongroup==1.3.1 ; python_full_version < '3.11'
|
|
# via anyio
|
|
fastapi==0.141.1
|
|
# via simplefarm
|
|
h11==0.16.0
|
|
# via uvicorn
|
|
httptools==0.8.0
|
|
# via uvicorn
|
|
idna==3.20
|
|
# via anyio
|
|
pydantic==2.13.5
|
|
# via fastapi
|
|
pydantic-core==2.46.5
|
|
# via pydantic
|
|
python-dotenv==1.2.3
|
|
# via uvicorn
|
|
pyyaml==6.0.3
|
|
# via uvicorn
|
|
starlette==1.6.0
|
|
# via fastapi
|
|
typing-extensions==4.16.0
|
|
# via
|
|
# anyio
|
|
# exceptiongroup
|
|
# fastapi
|
|
# pydantic
|
|
# pydantic-core
|
|
# starlette
|
|
# typing-inspection
|
|
# uvicorn
|
|
typing-inspection==0.4.4
|
|
# via
|
|
# fastapi
|
|
# pydantic
|
|
uvicorn==0.53.0
|
|
# via simplefarm
|
|
uvloop==0.22.1 ; platform_python_implementation != 'PyPy' and sys_platform != 'cygwin' and sys_platform != 'win32'
|
|
# via uvicorn
|
|
watchfiles==1.2.0
|
|
# via uvicorn
|
|
websockets==16.1.1 ; python_full_version < '3.11'
|
|
# via uvicorn
|
|
websockets==17.1 ; python_full_version >= '3.11'
|
|
# via uvicorn
|