dbcli / mssql-cli

A command-line client for SQL Server with auto-completion and syntax highlighting
BSD 3-Clause "New" or "Revised" License
1.35k stars 191 forks source link

Classes Under Wrong Module #373

Closed PY84 closed 4 years ago

PY84 commented 4 years ago

https://github.com/dbcli/mssql-cli/blob/6b7c874343ebc0ce70fa01b399885628b5e9e9e5/mssqlcli/mssql_cli.py#L18

The "PromptSession" and "CompleteStyle" classes are found under the Shortcuts module, not prompt. The current import command will result in error message such as:

ImportError: No module named prompt

This line 18 should be corrected to:

from prompt_toolkit.shortcuts import PromptSession, CompleteStyle

Documentation reference: https://python-prompt-toolkit.readthedocs.io/en/stable/pages/reference.html#prompt_toolkit.shortcuts.PromptSession https://python-prompt-toolkit.readthedocs.io/en/stable/pages/reference.html#prompt_toolkit.shortcuts.CompleteStyle

ellbosch commented 4 years ago

Good catch! Just created a PR to fix this.

Thanks for sharing :)