InstructionsForAI
python-docstring-generator.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---description: Automatically generates comprehensive Python docstrings in Google style format.--- # Python Docstring Generator Generate comprehensive docstrings for Python functions, classes, and modules. ## Style GuideUse Google-style docstrings for consistency. ### Function Example```pythondef fetch_user_data(user_id: str, include_metadata: bool = False) -> dict: """Fetches user data from the database.  Retrieves complete user profile information including optional metadata fields when requested.  Args: user_id: The unique identifier of the user. include_metadata: Whether to include additional metadata in the response. Defaults to False.  Returns: A dictionary containing user profile data with keys: - name: User full name - email: User email address - created_at: Account creation timestamp - metadata: (optional) Additional user metadata  Raises: UserNotFoundError: If no user exists with the given ID. DatabaseConnectionError: If database is unreachable.  Example: >>> user = fetch_user_data("usr_123", include_metadata=True) >>> print(user["name"]) "John Doe" """``` ### Class Example```pythonclass DataProcessor: """Processes and transforms raw data for analysis.  This class provides methods for cleaning, validating, and transforming datasets before they are used in ML pipelines.  Attributes: config: Processing configuration dictionary. logger: Logger instance for tracking operations. """```
Claude SkillMarkdown