|
4 | 4 |
|
5 | 5 | import json |
6 | 6 | import sys |
7 | | -from pathlib import Path |
8 | 7 | from typing import Any |
9 | 8 |
|
10 | 9 | import click |
11 | 10 | from rich.console import Console |
12 | 11 | from rich.table import Table |
13 | 12 |
|
14 | 13 | from . import __version__ |
| 14 | + |
15 | 15 | try: |
16 | 16 | from revenueholdings_core import check_license_and_limit |
17 | 17 | except ImportError: |
18 | 18 | check_license_and_limit = None |
19 | 19 | from .converters import ( |
20 | 20 | convert, |
21 | 21 | convert_batch, |
22 | | - supported_formats, |
23 | 22 | detect_format, |
| 23 | + supported_formats, |
24 | 24 | validate, |
25 | 25 | ) |
26 | 26 |
|
@@ -144,7 +144,7 @@ def batch_cmd( |
144 | 144 | success = [r for r in results if not r.errors] |
145 | 145 | failed = [r for r in results if r.errors] |
146 | 146 |
|
147 | | - console.print(f"\n[bold]Batch Conversion Complete[/bold]") |
| 147 | + console.print("\n[bold]Batch Conversion Complete[/bold]") |
148 | 148 | console.print(f" Files: {len(success)} converted, {len(failed)} failed") |
149 | 149 |
|
150 | 150 | if failed: |
@@ -231,7 +231,10 @@ def formats_cmd() -> None: |
231 | 231 | @cli.command() |
232 | 232 | @click.argument("file", type=click.Path(exists=True)) |
233 | 233 | @click.option("--format", "-f", "fmt", default=None, help="File format (auto-detected if omitted)") |
234 | | -@click.option("--schema", "-s", "schema_file", default=None, type=click.Path(exists=True), help="JSON schema file to validate against") |
| 234 | +@click.option( |
| 235 | + "--schema", "-s", "schema_file", default=None, |
| 236 | + type=click.Path(exists=True), help="JSON schema file to validate against", |
| 237 | +) |
235 | 238 | @click.option("--strict", is_flag=True, help="Strict mode: fail on type mismatches and missing fields") |
236 | 239 | @click.option("--max-rows", default=0, type=int, help="Maximum rows to validate (0 = all)") |
237 | 240 | @click.option("--json-output", "-j", is_flag=True, help="Output validation result as JSON") |
|
0 commit comments