From 40451f49502698f1e4d8de193c4c295118c2aae4 Mon Sep 17 00:00:00 2001 From: Saul Pwanson Date: Fri, 1 Sep 2023 17:38:31 -0700 Subject: [PATCH] private functions should start with _ --- visidata/aggregators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/visidata/aggregators.py b/visidata/aggregators.py index 9fb729f25..5abd3c44d 100644 --- a/visidata/aggregators.py +++ b/visidata/aggregators.py @@ -72,7 +72,7 @@ def __call__(self, *args, **kwargs): @VisiData.api def aggregator(vd, name, funcValues, helpstr='', *args, type=None): 'Define simple aggregator *name* that calls ``funcValues(values, *args)`` to aggregate *values*. Use *type* to force the default type of the aggregated column.' - def funcRows(col, rows): # wrap builtins so they can have a .type + def _funcRows(col, rows): # wrap builtins so they can have a .type vals = list(col.getValues(rows)) try: return funcValues(vals, *args) @@ -81,7 +81,7 @@ def funcRows(col, rows): # wrap builtins so they can have a .type return None return e - vd.aggregators[name] = _defaggr(name, type, funcRows, funcValues=funcValues, helpstr=helpstr) # accepts a srccol + list of rows + vd.aggregators[name] = _defaggr(name, type, _funcRows, funcValues=funcValues, helpstr=helpstr) # accepts a srccol + list of rows ## specific aggregator implementations