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
28:32: E261 at least two spaces before inline comment
28:33: E262 inline comment should start with '# '
40:28: E126 continuation line over-indented for hanging indent
47:37: E126 continuation line over-indented for hanging indent
49:39: E126 continuation line over-indented for hanging indent
63:40: E126 continuation line over-indented for hanging indent
73:1: E302 expected 2 blank lines, found 1
73: D202 No blank lines allowed *after* function docstring, found 1
73: D400 First line should end with '.', not 'p'
218:1: E302 expected 2 blank lines, found 1
218: D203 Expected 1 blank line *before* class docstring, found 0
218: D204 Expected 1 blank line *after* class docstring, found 0
218: D205 Blank line missing between one-line summary and description
236: D401 First line should be imperative: 'Create', not 'Creates'
254: D400 First line should end with '.', not 'm'
254: D205 Blank line missing between one-line summary and description
276:30: E713 test for membership should be 'not in'
305:107: E502 the backslash is redundant between brackets
322:111: E502 the backslash is redundant between brackets
336: D401 First line should be imperative: 'Return', not 'Returns'
336: D205 Blank line missing between one-line summary and description
409: D401 First line should be imperative: 'Thi', not 'This'
409: D400 First line should end with '.', not 'm'
409: D205 Blank line missing between one-line summary and description
422: D401 First line should be imperative: 'Convert', not 'Converts'
422: D200 One-line docstring should not occupy 3 lines
432: D400 First line should end with '.', not 'g'
432: D205 Blank line missing between one-line summary and description
487:34: E711 comparison to None should be 'if cond is not None:'
494:80: E502 the backslash is redundant between brackets
509: D401 First line should be imperative: 'Look', not 'Looks'
509: D400 First line should end with '.', not 'o'
509: D205 Blank line missing between one-line summary and description
530: D400 First line should end with '.', not 'a'
530: D205 Blank line missing between one-line summary and description
556:1: E302 expected 2 blank lines, found 1
556: D401 First line should be imperative: 'Get', not 'Gets'
556: D200 One-line docstring should not occupy 3 lines
568:1: E302 expected 2 blank lines, found 1
568: D401 First line should be imperative: 'Return', not 'Returns'
568: D205 Blank line missing between one-line summary and description
587:1: E302 expected 2 blank lines, found 1
587: D290 White spaces around docstring should be trimmed.
587: D400 First line should end with '.', not 'h'
591:1: E302 expected 2 blank lines, found 1
591: D400 First line should end with '.', not 'm'
591: D205 Blank line missing between one-line summary and description
629:1: E302 expected 2 blank lines, found 1
629: D400 First line should end with '.', not 'y'
629: D205 Blank line missing between one-line summary and description
641:51: E502 the backslash is redundant between brackets
642:67: E502 the backslash is redundant between brackets
647:1: E302 expected 2 blank lines, found 1
647: D401 First line should be imperative: 'Generate', not 'Generates'
669:54: E502 the backslash is redundant between brackets
672:68: E502 the backslash is redundant between brackets
673:30: E127 continuation line over-indented for visual indent
674:57: E502 the backslash is redundant between brackets
675:31: E127 continuation line over-indented for visual indent
676:61: E502 the backslash is redundant between brackets
677:31: E127 continuation line over-indented for visual indent
680:1: E302 expected 2 blank lines, found 1
680:76: E502 the backslash is redundant between brackets
680: D400 First line should end with '.', not 'o'
680: D205 Blank line missing between one-line summary and description
681:72: E502 the backslash is redundant between brackets
682:59: E502 the backslash is redundant between brackets
683:70: E502 the backslash is redundant between brackets
755:83: E502 the backslash is redundant between brackets
794:105: E502 the backslash is redundant between brackets
795:65: E128 continuation line under-indented for visual indent
800:107: E502 the backslash is redundant between brackets
801:67: E128 continuation line under-indented for visual indent
815:107: E502 the backslash is redundant between brackets
821:111: E502 the backslash is redundant between brackets
834:107: E502 the backslash is redundant between brackets
835:67: E128 continuation line under-indented for visual indent
844:110: E502 the backslash is redundant between brackets
848:1: E302 expected 2 blank lines, found 1
848:98: E502 the backslash is redundant between brackets
848: D401 First line should be imperative: 'Matche', not 'Matches'
849:69: E502 the backslash is redundant between brackets
850:74: E502 the backslash is redundant between brackets
921:24: E711 comparison to None should be 'if cond is not None:'
934:76: E502 the backslash is redundant between brackets
948:75: E502 the backslash is redundant between brackets
949:37: E128 continuation line under-indented for visual indent
957:101: E502 the backslash is redundant between brackets
965:100: E502 the backslash is redundant between brackets
966:84: E502 the backslash is redundant between brackets
967:84: E502 the backslash is redundant between brackets
968:98: E502 the backslash is redundant between brackets
969:94: E502 the backslash is redundant between brackets
970:86: E502 the backslash is redundant between brackets
1041:88: E502 the backslash is redundant between brackets
1048:42: E128 continuation line under-indented for visual indent
1048:86: E502 the backslash is redundant between brackets
1052:42: E128 continuation line under-indented for visual indent
1054:42: E711 comparison to None should be 'if cond is None:'
1061:42: E711 comparison to None should be 'if cond is None:'
1079:119: E502 the backslash is redundant between brackets
1087:112: E502 the backslash is redundant between brackets
1088:96: E502 the backslash is redundant between brackets
1089:96: E502 the backslash is redundant between brackets
1090:110: E502 the backslash is redundant between brackets
1091:106: E502 the backslash is redundant between brackets
1092:98: E502 the backslash is redundant between brackets
1124:1: E302 expected 2 blank lines, found 1
1124: D401 First line should be imperative: 'Take', not 'Takes'
1124: D400 First line should end with '.', not 't'
1124: D205 Blank line missing between one-line summary and description
1145:1: E302 expected 2 blank lines, found 1
1145: D400 First line should end with '.', not 'y'
1145: D205 Blank line missing between one-line summary and description
1156:1: E302 expected 2 blank lines, found 1
1156: D400 First line should end with '.', not 's'
1156: D205 Blank line missing between one-line summary and description
1164:18: E128 continuation line under-indented for visual indent
1165:20: E126 continuation line over-indented for hanging indent
1189:18: E126 continuation line over-indented for hanging indent
1191:34: F841 local variable 'e' is assigned to but never used
1324:90: E502 the backslash is redundant between brackets
1326:86: E502 the backslash is redundant between brackets