File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77import typer
88
9- from revenueholdings_license import require_license
9+ try :
10+ from revenueholdings_license import require_license
11+ except ImportError :
12+ require_license = None
1013
1114from .converter import JSONToSQLConverter
1215from .dialects import Dialect
@@ -56,7 +59,8 @@ def convert(
5659 ),
5760):
5861 """Convert a JSON file to SQL INSERT statements."""
59- require_license ("json2sql" )
62+ if require_license :
63+ require_license ("json2sql" )
6064 # Read input
6165 if input_file :
6266 json_text = input_file .read_text (encoding = "utf-8" )
@@ -92,15 +96,17 @@ def mcp():
9296 AI coding agents (Claude Code, Cursor, etc.) use this to interact
9397 with json2sql tools directly.
9498 """
95- require_license ("json2sql" )
99+ if require_license :
100+ require_license ("json2sql" )
96101 from click_to_mcp import run
97102 run (app )
98103
99104
100105@app .command ()
101106def version ():
102107 """Show version."""
103- require_license ("json2sql" )
108+ if require_license :
109+ require_license ("json2sql" )
104110 from . import __version__
105111 typer .echo (f"json2sql { __version__ } " )
106112
You can’t perform that action at this time.
0 commit comments