From f88fb570471f6e7f79b7177f32e146d772cc816a Mon Sep 17 00:00:00 2001 From: Brian Mesick Date: Thu, 16 Jan 2025 10:07:06 -0500 Subject: [PATCH] fix: Error when no report files passed in to render_reports --- code_annotations/cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code_annotations/cli.py b/code_annotations/cli.py index 2fecaac..a7bd997 100644 --- a/code_annotations/cli.py +++ b/code_annotations/cli.py @@ -7,6 +7,7 @@ import traceback import click +from django.db.models.fields.related import RECURSIVE_RELATIONSHIP_CONSTANT from code_annotations.base import AnnotationConfig, ConfigurationException from code_annotations.find_django import DjangoSearch @@ -241,6 +242,11 @@ def generate_docs(config_file, verbosity, report_files): try: config = AnnotationConfig(config_file, verbosity) + if not report_files: + raise ConfigurationException( + "No report files provided. Please provide one or more report files to generate docs from." + ) + for key in ( "report_template_dir", "rendered_report_dir",