AOSSIE-Org / AOSSIE-Org/PictoPy

DOC: Remove dead app/schemas/test.py and compress signature-restating docstrings (follow-up to #1458)

オープン
#1,499 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
documentation enhancement
主要言語
Python
スター
284
フォーク
680
平均マージ
7日 5時間
マージ済み PR(30日)
4

説明

### What's wrong with the existing documentation

Two follow-ups from #1458 that #1480 deliberately left out of scope to keep that PR reviewable. Both are in-code documentation rather than prose docs.

**1. `backend/app/schemas/test.py` is dead, and provably so once #1480 merges.**

51 lines of Pydantic models. On `main` today its only reference anywhere in the repository is a commented-out import:

```
backend/app/routes/test.py:9:# from app.schemas.test import (
```

#1480 deletes `routes/test.py` outright (it was 173 lines, entirely commented out). After that merges, `schemas/test.py` has zero references of any kind, commented or live. It should go the same way. Git remembers it.

This is blocked on #1480 and should not be attempted before it lands.

**2. Multi-line docstrings that restate the signature.**

`AGENTS.md` says comments should be "one or two lines, explaining *why* rather than *what*" and that "the codebase does not use long prose comment blocks or multi-paragraph docstrings". Measured against `main` (`510d4d0`) with an AST walk over all 123 backend Python files:

| | count |
| --- | --- |
| multi-line docstrings | 369 |
| Google-style `Args:` / `Returns:` / `Raises:` blocks | 73 |

Heaviest files:

```
20 backend/app/database/memories.py
15 backend/app/utils/face_clusters.py
15 backend/app/utils/memory_curator.py
14 backend/app/database/folders.py
14 backend/app/utils/videos.py
14 backend/tests/test_memory_curator.py
13 backend/app/utils/memory_scoring.py
13 backend/tests/test_memory_signals_db.py
```

These numbers have grown since I first scoped this in #1480's body, which is an argument for doing it rather than leaving it.

The same rule from #1458 applies: this is not a blanket strip. Per @rohan-pandeyy's steer on that issue, docstrings carrying real reasoning get compressed with the argument intact, and only the ones restating the signature below them get removed. An `Args:` block that names each parameter and its type, when the annotated signature already says both, is the clear case.

Suggested split, since 369 sites is too much for one reviewable PR:

- the dead file on its own, straight after #1480 merges
- `app/database/` and `app/utils/` in one pass
- `tests/` in a second

### Add ScreenShots

Not applicable, this is in-code documentation.

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

First verify that #1480 has merged, then read AGENTS.md and inspect backend/app/schemas/test.py plus the app/database/ and app/utils/ docstrings listed in the issue. Remove the dead file and compress only signature-restating docstrings, preserving reasoning; leave the tests/ pass for a separate reviewable change.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend, documentation
issue の種類
ドキュメント
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
62/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。