Rewrite Python comments in Google developer documentation style (#12)

* Rewrite comments in Google developer documentation style

Rewrite the comments and docstrings across the backend core modules so they
read plainly. The previous prose was accurate but dense and figurative, which
made it slow to skim.

Applies the Google developer documentation style guide: short sentences, active
voice, present tense, American spelling, and no metaphors, idioms, or
rhetorical asides. Replaces em-dash chains with separate sentences.
This commit is contained in:
Parth
2026-08-26 15:37:25 +05:30
committed by GitHub
parent cf6161a5ee
commit e7d75c3b05
83 changed files with 4605 additions and 3988 deletions
+6 -5
View File
@@ -75,12 +75,13 @@ def make_scenario(client, **kwargs):
def edit_scenario(scenario_id, cards=None, **fields):
"""Author-side edit, straight to the DB (the scenario API is tested elsewhere).
"""Author-side edit, straight to the database. The scenario API is
tested elsewhere.
`cards` is the scenario's full card list afterwards. Cards are matched to
existing rows by name and edited in place, exactly as ScenarioEditor does
(PATCH /story-cards/{id}) — card ids are stable across authoring, which is
what source_ref tracking relies on.
`cards` is the scenario's full card list afterwards. Cards are matched
to existing rows by name and edited in place, exactly as ScenarioEditor
does (PATCH /story-cards/{id}). Card ids stay stable across authoring,
which is what source_ref tracking relies on.
"""
db = SessionLocal()
try: