summaryrefslogtreecommitdiffstats
path: root/pgcli/pgcompleter.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-03-02 12:22:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-03-02 12:22:00 +0000
commit3a44ae7d0d4c7f63d7349c26ba4e800cb9f55974 (patch)
tree7f9ff5ec30175ee816fbbb16333fa0c77cb9d5fd /pgcli/pgcompleter.py
parentAdding upstream version 3.3.1. (diff)
downloadpgcli-3a44ae7d0d4c7f63d7349c26ba4e800cb9f55974.tar.xz
pgcli-3a44ae7d0d4c7f63d7349c26ba4e800cb9f55974.zip
Adding upstream version 3.4.0.upstream/3.4.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pgcli/pgcompleter.py')
-rw-r--r--pgcli/pgcompleter.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/pgcli/pgcompleter.py b/pgcli/pgcompleter.py
index 227e25c..e66c3dc 100644
--- a/pgcli/pgcompleter.py
+++ b/pgcli/pgcompleter.py
@@ -491,11 +491,14 @@ 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)
)