Skip to content

Commit e8e43a1

Browse files
fix: move require_license() into function body (was in param list)
The require_license call was placed syntactically between the function signature and its first parameter, causing a SyntaxError at import time.
1 parent 991e805 commit e8e43a1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/json2sql/cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
import typer
88

9+
from revenueholdings_license import require_license
10+
911
from .converter import JSONToSQLConverter
1012
from .dialects import Dialect
1113

@@ -54,6 +56,7 @@ def convert(
5456
),
5557
):
5658
"""Convert a JSON file to SQL INSERT statements."""
59+
require_license("json2sql")
5760
# Read input
5861
if input_file:
5962
json_text = input_file.read_text(encoding="utf-8")
@@ -89,13 +92,15 @@ def mcp():
8992
AI coding agents (Claude Code, Cursor, etc.) use this to interact
9093
with json2sql tools directly.
9194
"""
95+
require_license("json2sql")
9296
from click_to_mcp import run
9397
run(app)
9498

9599

96100
@app.command()
97101
def version():
98102
"""Show version."""
103+
require_license("json2sql")
99104
from . import __version__
100105
typer.echo(f"json2sql {__version__}")
101106

0 commit comments

Comments
 (0)