1414except ImportError :
1515 import warnings
1616
17- warnings .warn (
18- "revenueholdings-license not installed; license checks skipped" , stacklevel = 2
19- )
17+ warnings .warn ("revenueholdings-license not installed; license checks skipped" , stacklevel = 2 )
2018
2119 def require_license (product : str ) -> None : # type: ignore[misc]
2220 pass
@@ -45,9 +43,7 @@ def _app_callback(
4543) -> None :
4644 """Convert JSON files/datasets to SQL INSERT statements."""
4745 global _require_license_strict
48- _require_license_strict = require_license_flag or bool (
49- os .environ .get ("REVENUEHOLDINGS_REQUIRE_LICENSE" )
50- )
46+ _require_license_strict = require_license_flag or bool (os .environ .get ("REVENUEHOLDINGS_REQUIRE_LICENSE" ))
5147
5248
5349def _check_license (tool_name : str ) -> None :
@@ -61,8 +57,7 @@ def _check_license(tool_name: str) -> None:
6157 except ImportError :
6258 if _require_license_strict :
6359 typer .echo (
64- "Error: revenueholdings-license is not installed. "
65- "Install it with: pip install revenueholdings-license" ,
60+ "Error: revenueholdings-license is not installed. Install it with: pip install revenueholdings-license" ,
6661 err = True ,
6762 )
6863 raise typer .Exit (code = 1 ) from None
@@ -120,9 +115,7 @@ def convert(
120115 dialect_enum = Dialect (dialect )
121116 except ValueError :
122117 valid = ", " .join (d .value for d in Dialect )
123- typer .echo (
124- f"Error: Unknown dialect '{ dialect } '. Choose from: { valid } " , err = True
125- )
118+ typer .echo (f"Error: Unknown dialect '{ dialect } '. Choose from: { valid } " , err = True )
126119 raise typer .Exit (code = 1 ) from None
127120
128121 # Read input
@@ -165,8 +158,7 @@ def mcp() -> None:
165158 from click_to_mcp import run # type: ignore[import-untyped]
166159 except ImportError :
167160 typer .echo (
168- "Error: click_to_mcp is required for MCP mode. "
169- "Install it with: pip install click-to-mcp" ,
161+ "Error: click_to_mcp is required for MCP mode. Install it with: pip install click-to-mcp" ,
170162 err = True ,
171163 )
172164 raise typer .Exit (code = 1 ) from None
@@ -183,4 +175,3 @@ def version() -> None:
183175
184176if __name__ == "__main__" :
185177 app ()
186-
0 commit comments