Skip to content

Commit

Permalink
fix: Error when no report files passed in to render_reports
Browse files Browse the repository at this point in the history
  • Loading branch information
bmtcril committed Jan 16, 2025
1 parent b33607d commit f88fb57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code_annotations/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit f88fb57

Please sign in to comment.