mirror of https://github.com/dbcli/pgcli
Blacken.
This commit is contained in:
parent
1d2570f462
commit
6309dd4f93
|
@ -1,6 +1,6 @@
|
|||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: stable
|
||||
rev: 21.5b0
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.7
|
||||
|
|
|
@ -1248,7 +1248,8 @@ def cli(
|
|||
else:
|
||||
print("Config file is now located at", config_full_path)
|
||||
print(
|
||||
"Please move the existing config file ~/.pgclirc to", config_full_path,
|
||||
"Please move the existing config file ~/.pgclirc to",
|
||||
config_full_path,
|
||||
)
|
||||
if list_dsn:
|
||||
try:
|
||||
|
|
|
@ -140,7 +140,7 @@ class PGCompleter(Completer):
|
|||
return "'{}'".format(self.unescape_name(name))
|
||||
|
||||
def unescape_name(self, name):
|
||||
""" Unquote a string."""
|
||||
"""Unquote a string."""
|
||||
if name and name[0] == '"' and name[-1] == '"':
|
||||
name = name[1:-1]
|
||||
|
||||
|
@ -491,14 +491,11 @@ class PGCompleter(Completer):
|
|||
|
||||
def get_column_matches(self, suggestion, word_before_cursor):
|
||||
tables = suggestion.table_refs
|
||||
do_qualify = (
|
||||
suggestion.qualifiable
|
||||
and {
|
||||
"always": True,
|
||||
"never": False,
|
||||
"if_more_than_one_table": len(tables) > 1,
|
||||
}[self.qualify_columns]
|
||||
)
|
||||
do_qualify = suggestion.qualifiable and {
|
||||
"always": True,
|
||||
"never": False,
|
||||
"if_more_than_one_table": len(tables) > 1,
|
||||
}[self.qualify_columns]
|
||||
qualify = lambda col, tbl: (
|
||||
(tbl + "." + self.case(col)) if do_qualify else self.case(col)
|
||||
)
|
||||
|
|
|
@ -73,7 +73,7 @@ def drop_tables(conn):
|
|||
def run(
|
||||
executor, sql, join=False, expanded=False, pgspecial=None, exception_formatter=None
|
||||
):
|
||||
" Return string output for the sql to be run "
|
||||
"Return string output for the sql to be run"
|
||||
|
||||
results = executor.run(sql, pgspecial, exception_formatter)
|
||||
formatted = []
|
||||
|
|
Loading…
Reference in New Issue