summaryrefslogtreecommitdiffstats
path: root/pgcli/packages/parseutils/tables.py
diff options
context:
space:
mode:
Diffstat (limited to 'pgcli/packages/parseutils/tables.py')
-rw-r--r--pgcli/packages/parseutils/tables.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/pgcli/packages/parseutils/tables.py b/pgcli/packages/parseutils/tables.py
index aaa676c..f2e1e42 100644
--- a/pgcli/packages/parseutils/tables.py
+++ b/pgcli/packages/parseutils/tables.py
@@ -63,17 +63,13 @@ def extract_from_part(parsed, stop_at_punctuation=True):
yield item
elif item.ttype is Keyword or item.ttype is Keyword.DML:
item_val = item.value.upper()
- if (
- item_val
- in (
- "COPY",
- "FROM",
- "INTO",
- "UPDATE",
- "TABLE",
- )
- or item_val.endswith("JOIN")
- ):
+ if item_val in (
+ "COPY",
+ "FROM",
+ "INTO",
+ "UPDATE",
+ "TABLE",
+ ) or item_val.endswith("JOIN"):
tbl_prefix_seen = True
# 'SELECT a, FROM abc' will detect FROM as part of the column list.
# So this check here is necessary.