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: D200 One-line docstring should not occupy 3 lines
36:29: E126 continuation line over-indented for hanging indent
54:31: E126 continuation line over-indented for hanging indent
76: D103 Docstring missing
93:1: E302 expected 2 blank lines, found 1
93: D290 White spaces around docstring should be trimmed.
93: D400 First line should end with '.', not 's'
93: D200 One-line docstring should not occupy 2 lines
118:8: E713 test for membership should be 'not in'
148:63: E502 the backslash is redundant between brackets
149:16: E128 continuation line under-indented for visual indent
150:16: E126 continuation line over-indented for hanging indent
159:39: E261 at least two spaces before inline comment
188:1: E302 expected 2 blank lines, found 1
188: D205 Blank line missing between one-line summary and description
205:63: E502 the backslash is redundant between brackets
206:9: E128 continuation line under-indented for visual indent
207:9: E128 continuation line under-indented for visual indent
236:13: E128 continuation line under-indented for visual indent
237:13: E128 continuation line under-indented for visual indent
240:1: E302 expected 2 blank lines, found 1
240: D290 White spaces around docstring should be trimmed.
240: D205 Blank line missing between one-line summary and description
253:5: F999 redefinition of unused 'sys' from line 27
253:5: F401 'sys' imported but unused
257:5: F401 'perform_request_search' imported but unused
258:39: E127 continuation line over-indented for visual indent
259:39: E127 continuation line over-indented for visual indent
262:19: E261 at least two spaces before inline comment
361:21: E128 continuation line under-indented for visual indent
362:21: E128 continuation line under-indented for visual indent
372:1: E302 expected 2 blank lines, found 1
372: D400 First line should end with '.', not 'r'
384:1: E302 expected 2 blank lines, found 1
384: D400 First line should end with '.', not 'r'
396:1: E302 expected 2 blank lines, found 1
396: D290 White spaces around docstring should be trimmed.
396: D400 First line should end with '.', not 's'
402:26: E126 continuation line over-indented for hanging indent
407:70: E261 at least two spaces before inline comment
408:70: E261 at least two spaces before inline comment
409:54: E261 at least two spaces before inline comment
412:77: E261 at least two spaces before inline comment
417:1: E302 expected 2 blank lines, found 1
417: D290 White spaces around docstring should be trimmed.
417: D400 First line should end with '.', not 's'
423:26: E126 continuation line over-indented for hanging indent
428:70: E261 at least two spaces before inline comment
429:70: E261 at least two spaces before inline comment
430:54: E261 at least two spaces before inline comment
433:77: E261 at least two spaces before inline comment
438:1: E302 expected 2 blank lines, found 1
438: D290 White spaces around docstring should be trimmed.
438: D400 First line should end with '.', not 'e'
448:1: E302 expected 2 blank lines, found 1
448: D401 First line should be imperative: 'Perform', not 'Performs'
448: D290 White spaces around docstring should be trimmed.
448: D400 First line should end with '.', not 'h'
448: D205 Blank line missing between one-line summary and description
465:1: E302 expected 2 blank lines, found 1
465: D401 First line should be imperative: 'Perform', not 'Performs'
465: D290 White spaces around docstring should be trimmed.
465: D400 First line should end with '.', not 'e'
465: D205 Blank line missing between one-line summary and description
471:5: E301 expected 1 blank line, found 0
500:1: E302 expected 2 blank lines, found 1
505:1: E302 expected 2 blank lines, found 1
509:1: E302 expected 2 blank lines, found 1
509: D401 First line should be imperative: 'I', not 'Is'
509: D400 First line should end with '.', not '?'
509: D205 Blank line missing between one-line summary and description
522:1: E302 expected 2 blank lines, found 1
522: D401 First line should be imperative: 'I', not 'Is'
522: D400 First line should end with '.', not '?'
522: D200 One-line docstring should not occupy 3 lines
531:1: E302 expected 2 blank lines, found 1
531: D401 First line should be imperative: 'I', not 'Is'
531: D400 First line should end with '.', not '?'
531: D205 Blank line missing between one-line summary and description
558:16: E713 test for membership should be 'not in'
564:29: E126 continuation line over-indented for hanging indent
571:16: E713 test for membership should be 'not in'
577:29: E126 continuation line over-indented for hanging indent
584:1: E302 expected 2 blank lines, found 1
584: D205 Blank line missing between one-line summary and description
608: D400 First line should end with '.', not 's'
608: D205 Blank line missing between one-line summary and description
616:35: E127 continuation line over-indented for visual indent
617:35: E127 continuation line over-indented for visual indent
658:1: E302 expected 2 blank lines, found 1
658: D401 First line should be imperative: 'Take', not 'Takes'
658: D400 First line should end with '.', not 't'
658: D205 Blank line missing between one-line summary and description
679:1: E302 expected 2 blank lines, found 1
679: D200 One-line docstring should not occupy 3 lines
688:1: E302 expected 2 blank lines, found 1
688: D200 One-line docstring should not occupy 3 lines