"""
import pydoc
+from typing import Sequence, Optional
from tabulate import tabulate
# TODO: sub shrt_desc for long if available, and support config.FOOD_NAME_TRUNC
- def print_results(_results: list, _nutrient_id: int) -> list:
+ def print_results(
+ _results: Sequence[Sequence[Optional[float]]], _nutrient_id: int
+ ) -> None:
"""Prints truncated list for sort"""
nutrients = sql_nutrients_overview()
nutrient = nutrients[_nutrient_id]
table = tabulate(_results, headers=headers, tablefmt="simple")
print(table)
- return _results
# Gets values for nutrient_id and kcal=208
nut_data = sql_sort_helper1(nutrient_id)