diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2719e1c..94df786 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,12 +17,12 @@ jobs: python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 + - uses: actions/checkout@v4 with: persist-credentials: false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/src/json2sql/cli.py b/src/json2sql/cli.py index a22d623..a184910 100644 --- a/src/json2sql/cli.py +++ b/src/json2sql/cli.py @@ -22,9 +22,6 @@ def require_license(product: str) -> None: # type: ignore[misc] pass -from .converter import JSONToSQLConverter -from .dialects import Dialect - _require_license_strict: bool = False app = typer.Typer( @@ -114,6 +111,10 @@ def convert( """Convert a JSON file to SQL INSERT statements.""" _check_license("json2sql") + # Lazy imports — cold-start optimization (~180ms savings) + from .converter import JSONToSQLConverter + from .dialects import Dialect + # Validate dialect try: dialect_enum = Dialect(dialect) @@ -182,3 +183,4 @@ def version() -> None: if __name__ == "__main__": app() +