diff --git a/CHANGELOG.md b/CHANGELOG.md index d0f5a35a..471cb91d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ All notable changes to this project will be documented in this file. - Harlequin now loads immediately and connects to your database in the background ([#393](https://github.com/tconbeer/harlequin/issues/393)). - Harlequin shows a loading indicator before the Data Catalog is hydrated for the first time ([#396](https://github.com/tconbeer/harlequin/issues/396)). +### Bug Fixes + +- Fixes a bug where `harlequin --config` would crash if configuring an adapter that declared no options. + ## [1.9.2] - 2024-01-10 ### Features diff --git a/poetry.lock b/poetry.lock index 2127fab9..5d0c1a3f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -914,13 +914,13 @@ mysql-connector-python = ">=8.2.0,<9.0.0" [[package]] name = "harlequin-odbc" -version = "0.1.0" +version = "0.1.1" description = "A Harlequin adapter for ODBC drivers." -optional = true +optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "harlequin_odbc-0.1.0-py3-none-any.whl", hash = "sha256:6743d27ec414ee851b389d0d1d1c8b3fe02a640ca808b1d6c70a8a55090e2c7d"}, - {file = "harlequin_odbc-0.1.0.tar.gz", hash = "sha256:a7db1b7cd349fee1701f00cbe3a6d0ad7eee10e3457a0beb9420dd1b8ea4f854"}, + {file = "harlequin_odbc-0.1.1-py3-none-any.whl", hash = "sha256:7c5554dec9ef0bedad5acb040b7346ae60257e8b907f6254398ba6beec0cde21"}, + {file = "harlequin_odbc-0.1.1.tar.gz", hash = "sha256:beb2b57836ccdb21b4fa4b151e2cd6fc1b946f4f914eb233de5debc2c08920cf"}, ] [package.dependencies] @@ -1787,7 +1787,7 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pyodbc" version = "5.0.1" description = "DB API module for ODBC" -optional = true +optional = false python-versions = ">=3.8" files = [ {file = "pyodbc-5.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9824b175db875a2dd116c7cf16dc3bdf14855404417afd145c5b839da222cb46"}, @@ -2738,4 +2738,4 @@ trino = ["harlequin-trino"] [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4.0.0" -content-hash = "9e417b2fb3cf8280655ca779a66747064600ee831eb38b7184a9bf988e80ed0f" +content-hash = "6a98c30a6864e1d1967b01f07d827fd2178a178a573bc2a9f724c42c54d65c47" diff --git a/pyproject.toml b/pyproject.toml index adad9431..13ec3e82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ pre-commit = "^3.3.1" textual-dev = "^1.0.1" harlequin-postgres = "^0.2" harlequin-mysql = "^0.1.1" +harlequin-odbc = "^0.1.1" [tool.poetry.group.static.dependencies] black = "^23.3.0" diff --git a/src/harlequin/config_wizard.py b/src/harlequin/config_wizard.py index 180ed540..16c2e615 100644 --- a/src/harlequin/config_wizard.py +++ b/src/harlequin/config_wizard.py @@ -88,11 +88,15 @@ def _wizard() -> None: if adapter_cls.ADAPTER_OPTIONS is not None else [] ) - which = questionary.checkbox( - message="Which of the following adapter options would you like to set?", - choices=adapter_option_choices, - style=HARLEQUIN_QUESTIONARY_STYLE, - ).unsafe_ask() + + if adapter_option_choices: + which = questionary.checkbox( + message="Which of the following adapter options would you like to set?", + choices=adapter_option_choices, + style=HARLEQUIN_QUESTIONARY_STYLE, + ).unsafe_ask() + else: + which = [] adapter_options = {} if conn_str: