Skip to content

Commit e124c03

Browse files
committed
Fix PEP8 empty line errors
1 parent f4d6adf commit e124c03

26 files changed

+87
-28
lines changed

pgcli/completion_refresher.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,34 +100,41 @@ def wrapper(wrapped):
100100
return wrapped
101101
return wrapper
102102

103+
103104
@refresher('schemata')
104105
def refresh_schemata(completer, executor):
105106
completer.set_search_path(executor.search_path())
106107
completer.extend_schemata(executor.schemata())
107108

109+
108110
@refresher('tables')
109111
def refresh_tables(completer, executor):
110112
completer.extend_relations(executor.tables(), kind='tables')
111113
completer.extend_columns(executor.table_columns(), kind='tables')
112114
completer.extend_foreignkeys(executor.foreignkeys())
113115

116+
114117
@refresher('views')
115118
def refresh_views(completer, executor):
116119
completer.extend_relations(executor.views(), kind='views')
117120
completer.extend_columns(executor.view_columns(), kind='views')
118121

122+
119123
@refresher('functions')
120124
def refresh_functions(completer, executor):
121125
completer.extend_functions(executor.functions())
122126

127+
123128
@refresher('types')
124129
def refresh_types(completer, executor):
125130
completer.extend_datatypes(executor.datatypes())
126131

132+
127133
@refresher('databases')
128134
def refresh_databases(completer, executor):
129135
completer.extend_database_names(executor.databases())
130136

137+
131138
@refresher('casing')
132139
def refresh_casing(completer, executor):
133140
casing_file = completer.casing_file

pgcli/encodingutils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
PY2 = sys.version_info[0] == 2
44
PY3 = sys.version_info[0] == 3
55

6+
67
def unicode2utf8(arg):
78
"""
89
Only in Python 2. Psycopg2 expects the args as bytes not unicode.
@@ -13,6 +14,7 @@ def unicode2utf8(arg):
1314
return arg.encode('utf-8')
1415
return arg
1516

17+
1618
def utf8tounicode(arg):
1719
"""
1820
Only in Python 2. Psycopg2 returns the error message as utf-8.

pgcli/filters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from prompt_toolkit.filters import Filter
22

3+
34
class HasSelectedCompletion(Filter):
45
"""Enable when the current buffer has a selected completion."""
56

pgcli/magic.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,5 @@ def pgcli_line_magic(line):
5858
_logger.debug('Dangerous query detected -- ignoring')
5959
return
6060

61-
6261
ipython = get_ipython()
6362
return ipython.run_cell_magic('sql', line, q.query)
64-
65-
66-
67-
68-
69-

pgcli/packages/expanded.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from .tabulate import _text_type
22
from ..encodingutils import utf8tounicode
33

4+
45
def pad(field, total, char=u" "):
56
return field + (char * (total - len(field)))
67

8+
79
def expanded_table(rows, headers, missingval=""):
810
header_len = max([len(x) for x in headers])
911
max_row_len = 0

pgcli/packages/ordereddict.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
from UserDict import DictMixin
2424

25+
2526
class OrderedDict(dict, DictMixin):
2627

2728
def __init__(self, *args, **kwds):

pgcli/packages/parseutils/ctes.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,3 @@ def _identifiers(tok):
140140
yield t
141141
elif isinstance(tok, Identifier):
142142
yield tok
143-
144-
145-
146-
147-
148-

pgcli/packages/parseutils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
'all_punctuations': re.compile('([^\s]+)$'),
1616
}
1717

18+
1819
def last_word(text, include='alphanum_underscore'):
1920
"""
2021
Find the last word in a sentence.
@@ -137,4 +138,3 @@ def parse_partial_identifier(word):
137138
return parse_partial_identifier(word + '"')
138139
else:
139140
return None
140-
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
2-

pgcli/packages/prioritization.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def _compile_regex(keyword):
1414
pattern = '\\b' + white_space_regex.sub(r'\\s+', keyword) + '\\b'
1515
return re.compile(pattern, re.MULTILINE | re.IGNORECASE)
1616

17+
1718
keywords = get_literals('keywords')
1819
keyword_regexs = dict((kw, _compile_regex(kw)) for kw in keywords)
1920

@@ -48,6 +49,3 @@ def keyword_count(self, keyword):
4849

4950
def name_count(self, name):
5051
return self.name_counts[name]
51-
52-
53-

0 commit comments

Comments
 (0)