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>
1: D100 Docstring missing
4: I102 copyright year is outdated, expected 2014 but got 2013
37:1: E302 expected 2 blank lines, found 1
37: D203 Expected 1 blank line *before* class docstring, found 0
37: D300 Expected """-quotes, got '-quotes
40: D401 First line should be imperative: 'Create', not 'Creates'
40: D202 No blank lines allowed *after* method docstring, found 1
40: D300 Expected """-quotes, got '-quotes
46:31: E261 at least two spaces before inline comment
47:26: E225 missing whitespace around operator
52:37: E231 missing whitespace after ','
54:56: E261 at least two spaces before inline comment
57: D401 First line should be imperative: 'Doe', not 'Does'
57: D400 First line should end with '.', not '?'
57: D300 Expected """-quotes, got '-quotes
64: D401 First line should be imperative: 'Return', not 'Returns'
64: D300 Expected """-quotes, got '-quotes
67:48: E261 at least two spaces before inline comment
71: D401 First line should be imperative: 'Add', not 'Adds'
71: D300 Expected """-quotes, got '-quotes
75:14: E261 at least two spaces before inline comment
81:21: E231 missing whitespace after ','
81:32: E251 unexpected spaces around keyword / parameter equals
81:34: E251 unexpected spaces around keyword / parameter equals
81: D401 First line should be imperative: 'Display', not 'Displays'
81: D300 Expected """-quotes, got '-quotes
100: D203 Expected 1 blank line *before* class docstring, found 0
100: D300 Expected """-quotes, got '-quotes
103: D401 First line should be imperative: 'Create', not 'Creates'
103: D300 Expected """-quotes, got '-quotes
108: D401 First line should be imperative: 'Add', not 'Adds'
108: D300 Expected """-quotes, got '-quotes
116: D401 First line should be imperative: 'Test', not 'Tests'
116: D300 Expected """-quotes, got '-quotes
121:46: E261 at least two spaces before inline comment
129:46: E261 at least two spaces before inline comment
137:49: E261 at least two spaces before inline comment
145:49: E261 at least two spaces before inline comment
152: D401 First line should be imperative: 'Display', not 'Displays'
152: D202 No blank lines allowed *after* method docstring, found 1
152: D300 Expected """-quotes, got '-quotes
165:90: E261 at least two spaces before inline comment
166:41: E261 at least two spaces before inline comment
179:17: E303 too many blank lines (2)
191:89: E231 missing whitespace after ','
195:9: E303 too many blank lines (2)
197:1: E302 expected 2 blank lines, found 1
197: D400 First line should end with '.', not 'e'
197: D300 Expected """-quotes, got '-quotes
201:1: E302 expected 2 blank lines, found 1
201: D401 First line should be imperative: 'split', not 'splits'
201: D202 No blank lines allowed *after* function docstring, found 1
201: D400 First line should end with '.', not ')'
201: D300 Expected """-quotes, got '-quotes
205:29: E231 missing whitespace after ','
207:9: E711 comparison to None should be 'if cond is not None:'
207:9: E225 missing whitespace around operator
214:42: E711 comparison to None should be 'if cond is None:'
214:35: E231 missing whitespace after ','
218:33: E231 missing whitespace after ','
219:43: E231 missing whitespace after ','
220:25: E711 comparison to None should be 'if cond is not None:'
220:25: E225 missing whitespace around operator
222:43: E231 missing whitespace after ','
223:25: E711 comparison to None should be 'if cond is not None:'
223:25: E225 missing whitespace around operator
227:43: E231 missing whitespace after ','
228:25: E711 comparison to None should be 'if cond is not None:'
228:25: E225 missing whitespace around operator
240:12: E231 missing whitespace after ','
240: D202 No blank lines allowed *after* function docstring, found 1
240: D400 First line should end with '.', not 's'
240: D300 Expected """-quotes, got '-quotes
249: D401 First line should be imperative: 'Transform', not 'Transforms'
249: D300 Expected """-quotes, got '-quotes
262:17: E261 at least two spaces before inline comment
272:29: E231 missing whitespace after ','
272:72: E231 missing whitespace after ','
272:76: E231 missing whitespace after ','
274:29: E231 missing whitespace after ','
274:72: E231 missing whitespace after ','
274:76: E231 missing whitespace after ','
276:29: E231 missing whitespace after ','
276:71: E231 missing whitespace after ','
276:75: E231 missing whitespace after ','
278:29: E231 missing whitespace after ','
280:29: E231 missing whitespace after ','
307:39: E225 missing whitespace around operator
316:39: E225 missing whitespace around operator
323:30: E231 missing whitespace after ','
329:30: E231 missing whitespace after ','
334:17: E225 missing whitespace around operator
334:34: E225 missing whitespace around operator
334:49: E225 missing whitespace around operator
334:64: E225 missing whitespace around operator
334:79: E225 missing whitespace around operator
334:94: E225 missing whitespace around operator
334:110: E225 missing whitespace around operator
341:21: E231 missing whitespace after ','
342:22: E231 missing whitespace after ','
346:1: E302 expected 2 blank lines, found 1
346: D203 Expected 1 blank line *before* class docstring, found 0
346: D204 Expected 1 blank line *after* class docstring, found 0
346: D400 First line should end with '.', not 'c'
346: D200 One-line docstring should not occupy 3 lines
350: D102 Docstring missing
356: D102 Docstring missing
359:1: E302 expected 2 blank lines, found 1
359: D401 First line should be imperative: 'Read', not 'Reads'
359: D202 No blank lines allowed *after* function docstring, found 1
359: D300 Expected """-quotes, got '-quotes
373:16: E261 at least two spaces before inline comment
375:30: E261 at least two spaces before inline comment
376:55: E261 at least two spaces before inline comment
385:23: E231 missing whitespace after ','
385:26: E231 missing whitespace after ','
388:50: E713 test for membership should be 'not in'
390:21: E128 continuation line under-indented for visual indent
393:21: E128 continuation line under-indented for visual indent
395:78: E231 missing whitespace after ','
397:49: E231 missing whitespace after ','
397:53: E231 missing whitespace after ','
397:57: E231 missing whitespace after ','
399:49: E231 missing whitespace after ','
399:53: E231 missing whitespace after ','
399:57: E231 missing whitespace after ','
401:49: E231 missing whitespace after ','
401:53: E231 missing whitespace after ','
401:57: E231 missing whitespace after ','
403:86: E231 missing whitespace after ','
405:46: E261 at least two spaces before inline comment
409:18: E261 at least two spaces before inline comment
410:42: E261 at least two spaces before inline comment
411:44: E261 at least two spaces before inline comment
417:47: E261 at least two spaces before inline comment
422:5: E303 too many blank lines (2)
428:32: E702 multiple statements on one line (semicolon)
440:1: E302 expected 2 blank lines, found 1
440: D401 First line should be imperative: 'Print', not 'Prints'
440: D300 Expected """-quotes, got '-quotes
450:1: E302 expected 2 blank lines, found 1
450: D300 Expected """-quotes, got '-quotes
454:41: E231 missing whitespace after ','
454:44: E231 missing whitespace after ','
458:1: E302 expected 2 blank lines, found 1
458: D202 No blank lines allowed *after* function docstring, found 1
458: D300 Expected """-quotes, got '-quotes
477:38: E225 missing whitespace around operator