From 23304ba20e514de60b3f162a60570c07e068bfba Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Mon, 9 Mar 2026 22:15:07 -0600 Subject: [PATCH] make matplotlib mandatory --- bac_analyze.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/bac_analyze.py b/bac_analyze.py index c3808c0..afb7f3a 100755 --- a/bac_analyze.py +++ b/bac_analyze.py @@ -12,11 +12,7 @@ import sys from collections import defaultdict from pathlib import Path -try: - import matplotlib.pyplot as plt - HAS_MATPLOTLIB = True -except ImportError: - HAS_MATPLOTLIB = False +import matplotlib.pyplot as plt def load_transactions(json_files: list[Path]) -> list[dict]: @@ -208,10 +204,6 @@ def main(): if not path.exists(): sys.exit(f"Error: File not found: {path}") - # Check matplotlib early if graph requested - if args.graph and not HAS_MATPLOTLIB: - sys.exit("Error: matplotlib is required for graphs. Install with: pip install matplotlib") - # Load categories if not args.categories.exists(): sys.exit(f"Error: Categories file not found: {args.categories}")