Fix linter errors in CLI and tests
This commit is contained in:
@@ -255,7 +255,7 @@ def export_report_cmd(
|
|||||||
"[red]Error:[/red] Report generation requires additional dependencies.\n"
|
"[red]Error:[/red] Report generation requires additional dependencies.\n"
|
||||||
"Install with: [cyan]pip install py_dvt_ate[reports][/cyan]"
|
"Install with: [cyan]pip install py_dvt_ate[reports][/cyan]"
|
||||||
)
|
)
|
||||||
raise typer.Exit(1)
|
raise typer.Exit(1) from None
|
||||||
|
|
||||||
# Load config
|
# Load config
|
||||||
if config_file is None:
|
if config_file is None:
|
||||||
@@ -295,7 +295,7 @@ def export_report_cmd(
|
|||||||
full_run_id = UUID(run_id)
|
full_run_id = UUID(run_id)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
console.print(f"[red]Error:[/red] Invalid run ID: '{run_id}'")
|
console.print(f"[red]Error:[/red] Invalid run ID: '{run_id}'")
|
||||||
raise typer.Exit(1)
|
raise typer.Exit(1) from None
|
||||||
|
|
||||||
# Create report config
|
# Create report config
|
||||||
report_config = ReportConfig(
|
report_config = ReportConfig(
|
||||||
@@ -324,7 +324,7 @@ def export_report_cmd(
|
|||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
console.print(f"[red]Error generating report:[/red] {e}")
|
console.print(f"[red]Error generating report:[/red] {e}")
|
||||||
raise typer.Exit(1)
|
raise typer.Exit(1) from None
|
||||||
finally:
|
finally:
|
||||||
repo.close()
|
repo.close()
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,7 @@
|
|||||||
Tests the full report generation pipeline from test run to PDF output.
|
Tests the full report generation pipeline from test run to PDF output.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
|
||||||
import tempfile
|
import tempfile
|
||||||
from datetime import datetime
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from uuid import UUID, uuid4
|
from uuid import UUID, uuid4
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ from datetime import datetime
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from py_dvt_ate.data.models import TestResult, TestRun, TestStatus
|
from py_dvt_ate.data.models import TestResult, TestRun, TestStatus
|
||||||
from py_dvt_ate.reporting.exceptions import TemplateRenderError
|
|
||||||
from py_dvt_ate.reporting.models import ReportConfig, ReportData
|
from py_dvt_ate.reporting.models import ReportConfig, ReportData
|
||||||
from py_dvt_ate.reporting.renderers.html import HTMLRenderer
|
from py_dvt_ate.reporting.renderers.html import HTMLRenderer
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user