Skip to content

Add Docstrings to Public Functions #1

@Ndukiye

Description

@Ndukiye

Description:
Many functions lack docstrings. Add Google-style docstrings to:

  • storage.py: get_date_range_usage(), cleanup_old_history()
  • enforcer.py: enforce_limit(), notify_user()
  • Monitor.py: normalize_bpftrace_line(), get_process_owner()

Example:

def get_date_range_usage(start_date, end_date):
    """
    Get aggregated bandwidth usage across a date range.
    
    Args:
        start_date (datetime.date): Start of range (inclusive)
        end_date (datetime.date): End of range (inclusive)
    
    Returns:
        dict: Process names mapped to {send, recv, total} in MB
    
    Example:
        >>> usage = get_date_range_usage(date(2024,1,1), date(2024,1,7))
        >>> usage['firefox']['total']
        1250.5
    """

Good First Issue | Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions