Adopt a single documentation standard: every docstring/comment should (1) explain intent and observable behavior, (2) make responsibility/ownership explicit, (3) be traceable when tied to external or non-obvious defaults, (4) be safe when examples could do harm, and (5) follow established docstring conventions without duplicating type annotations.
Practical rules
int | str) or has special handling, document why and when the special case occurs.Example pattern
def _gpt5_defaults_to_no_reasoning(model: str) -> bool:
"""Return True if a gpt-5 variant defaults to reasoning_effort='none'.
Notes:
Source: See OpenAI GPT-5.2 Prompting Guide and GPT-5.2 model docs.
If OpenAI changes these defaults, update this helper and add a regression test.
Args:
model: Model identifier (e.g., 'gpt-5.2', 'gpt-5.2-pro').
Returns:
True when the model defaults to no reasoning.
"""
...
Applying this standard will make docs easier to maintain, reduce user confusion, and prevent unsafe or misleading copy/paste behavior.
Enter the URL of a public GitHub repository