ajjNV5 / Potential-Study-Tool

NV5 Demand Side Management Interactive Tool
0 stars 1 forks source link

add docstrings to functions #13

Open mcfink-NV5 opened 3 months ago

mcfink-NV5 commented 3 months ago

I think we should add a quick "docstring" to all our functions. A docstring is a special kind of comment that is used to describe the purpose, parameters, and return values of a function, class, or module. In Python, docstrings are enclosed in triple quotes (""" or ''') and are placed immediately after the function definition. Here is an example:

def add(a, b):
    """
    Add two numbers and return the result.

    Parameters:
    a (int or float): The first number.
    b (int or float): The second number.

    Returns:
    int or float: The sum of the two numbers.
    """
    return a + b

This is something that CoPilot should be able to help us with -- you can either start writing a docstring in your code or explicitly ask copilot in chat for a docstring for a specific function and copilot will often return a usable docstring.