WestheadJ / pysmb-file-sorter

A file sorter using pysmb
MIT License
0 stars 0 forks source link

DOCS: Docstrings #4

Open isaac238 opened 1 month ago

isaac238 commented 1 month ago

Docstrings

Add docstrings in sphinx format to the functions to clearly convey the parameters, return value and use of the method. https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html

e.g.

def format_timestamp(timestamp):
    """
    Method to return y-m-d date string from a timestamp (elapsed time from epoch)

    :param timestamp: Timestamp to convert into datestring
    :type timestamp: timestamp
    :return: y-m-d representation of timestamp as a string
    :rtype: string
    """
    return datetime.fromtimestamp(timestamp).strftime("%y-%m-%d")