legacy: fix for run_sql import in bibrecord

* Addresses issue with imports outside application context.  (closes #2295)

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
38:1: F401 'auto_version_url' imported but unused
42:5: E128 continuation line under-indented for visual indent
43:5: E128 continuation line under-indented for visual indent
66:1: F401 'field_xml_output' imported but unused
78:1: F401 'CFG_BIBEDIT_PROTECTED_FIELDS' imported but unused
91:6: E126 continuation line over-indented for hanging indent
99:36: E126 continuation line over-indented for hanging indent
118:1: E302 expected 2 blank lines, found 1
118: D400 First line should end with '.', not ':'
118: D205 Blank line missing between one-line summary and description
125:17: E126 continuation line over-indented for hanging indent
128:22: E203 whitespace before ':'
129:23: E203 whitespace before ':'
130:23: E203 whitespace before ':'
131:28: E203 whitespace before ':'
132:33: E203 whitespace before ':'
133:13: E126 continuation line over-indented for hanging indent
134:23: E203 whitespace before ':'
135:30: E203 whitespace before ':'
137:33: E203 whitespace before ':'
138:22: E203 whitespace before ':'
139:24: E203 whitespace before ':'
140:13: E126 continuation line over-indented for hanging indent
142:1: E302 expected 2 blank lines, found 1
142: D400 First line should end with '.', not 's'
142: D205 Blank line missing between one-line summary and description
156:9: E112 expected an indented block
158:21: E126 continuation line over-indented for hanging indent
158:27: E203 whitespace before ':'
159:34: E203 whitespace before ':'
160:37: E203 whitespace before ':'
161:26: E203 whitespace before ':'
162:28: E203 whitespace before ':'
163:17: E121 continuation line under-indented for hanging indent
166:21: E126 continuation line over-indented for hanging indent
168:26: E203 whitespace before ':'
169:27: E203 whitespace before ':'
170:27: E203 whitespace before ':'
171:32: E203 whitespace before ':'
172:37: E203 whitespace before ':'
176:1: E302 expected 2 blank lines, found 1
178:11: E221 multiple spaces before operator
195:26: E251 unexpected spaces around keyword / parameter equals
195:34: E251 unexpected spaces around keyword / parameter equals
195:26: E221 multiple spaces before operator
196:25: E251 unexpected spaces around keyword / parameter equals
196:34: E251 unexpected spaces around keyword / parameter equals
196:25: E221 multiple spaces before operator
197:27: E251 unexpected spaces around keyword / parameter equals
197:34: E251 unexpected spaces around keyword / parameter equals
197:27: E221 multiple spaces before operator
198:29: E251 unexpected spaces around keyword / parameter equals
198:34: E251 unexpected spaces around keyword / parameter equals
198:29: E221 multiple spaces before operator
199:24: E251 unexpected spaces around keyword / parameter equals
199:34: E251 unexpected spaces around keyword / parameter equals
199:24: E221 multiple spaces before operator
200:29: E251 unexpected spaces around keyword / parameter equals
200:34: E251 unexpected spaces around keyword / parameter equals
200:29: E221 multiple spaces before operator
201:29: E251 unexpected spaces around keyword / parameter equals
201:34: E251 unexpected spaces around keyword / parameter equals
201:29: E221 multiple spaces before operator
202:32: E251 unexpected spaces around keyword / parameter equals
202:34: E251 unexpected spaces around keyword / parameter equals
203:24: E251 unexpected spaces around keyword / parameter equals
203:34: E251 unexpected spaces around keyword / parameter equals
203:24: E221 multiple spaces before operator
206:5: E303 too many blank lines (2)
240:32: E203 whitespace before ':'
241:33: E203 whitespace before ':'
242:27: E203 whitespace before ':'
242:66: E221 multiple spaces before operator
243:35: E203 whitespace before ':'
254: D290 White spaces around docstring should be trimmed.
316: D400 First line should end with '.', not 'h'
316: D205 Blank line missing between one-line summary and description
326: D400 First line should end with '.', not 'D'
326: D205 Blank line missing between one-line summary and description
346: D202 No blank lines allowed *after* function docstring, found 1
346: D400 First line should end with '.', not 's'
381:49: E128 continuation line under-indented for visual indent
384:1: E302 expected 2 blank lines, found 1
384: D400 First line should end with '.', not 'r'
384: D205 Blank line missing between one-line summary and description
405:55: E251 unexpected spaces around keyword / parameter equals
405:57: E251 unexpected spaces around keyword / parameter equals
420:9: E128 continuation line under-indented for visual indent
421:9: E128 continuation line under-indented for visual indent
421:9: E129 visually indented line with same indent as next logical line
488:1: E302 expected 2 blank lines, found 1
488: D290 White spaces around docstring should be trimmed.
488: D400 First line should end with '.', not 's'
541: D400 First line should end with '.', not 'f'
541: D205 Blank line missing between one-line summary and description
584: D400 First line should end with '.', not 'r'
584: D205 Blank line missing between one-line summary and description
765:75: E502 the backslash is redundant between brackets
860:35: E261 at least two spaces before inline comment
911:25: E127 continuation line over-indented for visual indent
927:53: E261 at least two spaces before inline comment
928:52: E111 indentation is not a multiple of four
928:52: E113 unexpected indentation
936:61: E126 continuation line over-indented for hanging indent
943:25: E126 continuation line over-indented for hanging indent
998:17: E128 continuation line under-indented for visual indent
1005: D202 No blank lines allowed *after* function docstring, found 1
1005: D400 First line should end with '.', not 'g'
1005: D205 Blank line missing between one-line summary and description
1116:21: E128 continuation line under-indented for visual indent
1149:67: E111 indentation is not a multiple of four
1151:44: E126 continuation line over-indented for hanging indent
1162:44: E261 at least two spaces before inline comment
1164:42: E261 at least two spaces before inline comment
1165:43: E111 indentation is not a multiple of four
1165:43: E113 unexpected indentation
1169:17: E128 continuation line under-indented for visual indent
1175:21: E128 continuation line under-indented for visual indent
1180:19: E128 continuation line under-indented for visual indent
1185:13: E128 continuation line under-indented for visual indent
1185:46: E251 unexpected spaces around keyword / parameter equals
1186:13: E122 continuation line missing indentation or outdented
1189:13: E128 continuation line under-indented for visual indent
1195:13: E128 continuation line under-indented for visual indent
1198:42: E203 whitespace before ','
1206:17: E128 continuation line under-indented for visual indent
1213:18: E261 at least two spaces before inline comment
1216:17: E128 continuation line under-indented for visual indent
1231:29: E128 continuation line under-indented for visual indent
1239:33: E128 continuation line under-indented for visual indent
1265: D400 First line should end with '.', not 'e'
1265: D205 Blank line missing between one-line summary and description
1279:9: E113 unexpected indentation
1351:1: E302 expected 2 blank lines, found 1
1351: D200 One-line docstring should not occupy 3 lines
1365:21: E128 continuation line under-indented for visual indent
1380:30: E126 continuation line over-indented for hanging indent
1405:21: F841 local variable 'ticket_assigned' is assigned to but never used
1448: D401 First line should be imperative: 'Add', not 'Adds'
1448: D400 First line should end with '.', not ')'
1448: D205 Blank line missing between one-line summary and description
1464:36: E127 continuation line over-indented for visual indent
1465:36: E127 continuation line over-indented for visual indent
1470: D400 First line should end with '.', not 's'
1487:9: E128 continuation line under-indented for visual indent
1488:13: E128 continuation line under-indented for visual indent
1489:9: E128 continuation line under-indented for visual indent
1494: D400 First line should end with '.', not 'l'
1494: D205 Blank line missing between one-line summary and description
1535: D290 White spaces around docstring should be trimmed.
1535: D202 No blank lines allowed *after* function docstring, found 1
1535: D400 First line should end with '.', not 'd'
1597: D290 White spaces around docstring should be trimmed.
1597: D400 First line should end with '.', not 'g'
1597: D200 One-line docstring should not occupy 3 lines
1629: D290 White spaces around docstring should be trimmed.
1629: D400 First line should end with '.', not 'F'
1629: D200 One-line docstring should not occupy 2 lines
1641: D290 White spaces around docstring should be trimmed.
1641: D400 First line should end with '.', not 't'
1641: D200 One-line docstring should not occupy 2 lines
1653:13: E126 continuation line over-indented for hanging indent
1658: D290 White spaces around docstring should be trimmed.
1658: D400 First line should end with '.', not 'o'
1658: D205 Blank line missing between one-line summary and description
1673:13: E128 continuation line under-indented for visual indent
1679: D401 First line should be imperative: 'Return', not 'Returns'
1679: D400 First line should end with '.', not 't'
1696:26: E128 continuation line under-indented for visual indent
1697:26: E124 closing bracket does not match visual indentation
1712:38: E128 continuation line under-indented for visual indent
1724:5: E303 too many blank lines (2)
1728:1: E302 expected 2 blank lines, found 1
1728: D400 First line should end with '.', not 's'
1780: D290 White spaces around docstring should be trimmed.
1780: D400 First line should end with '.', not 'e'
1793: D209 Put multi-line docstring closing quotes on separate line
1793: D400 First line should end with '.', not 'e'
1793: D205 Blank line missing between one-line summary and description
1813: D290 White spaces around docstring should be trimmed.
1813: D400 First line should end with '.', not 'e'
1818: D103 Docstring missing