Prerequisites
Feature Category
New Component (storage, generation, conversion, etc.)
Problem Statement
No response
Proposed Solution
Move all Docstrings of Init into classes.
Create assisted by AI
Include Code examples
Use Case & Examples
Python Docstring Best Practices
Placement
- Classes: Immediately after
class ClassName:
- Functions/Methods: Right after
def function_name():
- Modules: Top of file, after imports
Format
- Use
"""triple double quotes""" always (even for one-liners)
- One-liner: Brief summary ending with period
- Multi-line: Summary line + blank line + detailed sections
Content Priority
- What it does (user perspective, not implementation)
- How to use it (parameters, returns, examples)
- Important warnings (edge cases, constraints, exceptions)
Standard Structure
Follow PEP 257 + Google style for consistency:
class LinearConverter:
"""Convert flows using linear conversion factors.
Longer description explaining the purpose and context.
Multiple lines can be used here.
Args:
param1: Description of first parameter.
param2: Description of second parameter with more detail
if needed on multiple lines.
Returns:
Description of what the function returns.
Raises:
ValueError: When input validation fails.
TypeError: When wrong type is provided.
Examples:
Basic usage:
```python
converter = LinearConverter(
inputs=[flow1],
outputs=[flow2]
)
```
Note:
Important additional information or constraints.
Warning:
Critical information about potential issues.
"""
Key Guidelines
- User-focused: Write for the person using your code, not maintaining it
- Be specific: "Calculate efficiency" not "Do calculations"
- Include examples: Show real usage patterns
- Keep it current: Update docstrings when code changes
Desired API (Optional)
Alternatives Considered
No response
Priority/Impact
High - Would significantly improve workflow
Additional Context
No response
Prerequisites
Feature Category
New Component (storage, generation, conversion, etc.)
Problem Statement
No response
Proposed Solution
Move all Docstrings of Init into classes.
Create assisted by AI
Include Code examples
Use Case & Examples
Python Docstring Best Practices
Placement
class ClassName:def function_name():Format
"""triple double quotes"""always (even for one-liners)Content Priority
Standard Structure
Follow PEP 257 + Google style for consistency:
Key Guidelines
Desired API (Optional)
Alternatives Considered
No response
Priority/Impact
High - Would significantly improve workflow
Additional Context
No response