deffunction_name(arg1:type,arg2:type=default)->return_type:"""Brief description of the function. Longer description of what the function does, if needed. This can span multiple lines and should explain the purpose and behavior of the function. Args: arg1 (type): Description of arg1. arg2 (type, optional): Description of arg2. Defaults to default. Returns: return_type: Description of what is returned. Raises: ExceptionType: Description of when this exception is raised. Example: >>> function_name(1, 2) 3 >>> function_name("hello", "world") 'hello world' """
fromtypingimportOptional,Union,List,Dictdefexample_function(name:str,age:int,emails:Optional[List[str]]=None,metadata:Dict[str,Union[str,int]]=None)->bool:"""Example function with proper type annotations. Args: name (str): Person's name. age (int): Person's age. emails (List[str], optional): List of email addresses. Defaults to None. metadata (Dict[str, Union[str, int]], optional): Additional metadata. Defaults to None. Returns: bool: True if successful, False otherwise. """# implementation
#!/bin/bash# @file script_name.sh# @brief Brief description of what the script does# @description# Longer description of the script's functionality.# This can span multiple lines.## @author Your Name# @date 2023-12-01# @version 1.0.0# Function documentation# @description Brief description of what the function does# @param $1 Description of first parameter# @param $2 Description of second parameter# @return Description of return valuefunction_name(){# implementation}
"""Brief description of the module.Longer description of what this module provides and how to use it.Example: >>> import module_name >>> result = module_name.function()"""
classExampleClass:"""Brief description of the class. Longer description of the class functionality. Attributes: attribute_name (type): Description of the attribute. """def__init__(self,param:str):"""Initialize the class. Args: param (str): Description of the parameter. """self.attribute_name=param