legacy: import and static files fixes

* Addresses several issues with legacy import and missing style or javascript imports.
26:1: F401 'difflib' imported but unused
38:1: F401 'auto_version_url' imported but unused
79:1: F401 'field_xml_output' imported but unused
99:6: E126 continuation line over-indented for hanging indent
117:1: E302 expected 2 blank lines, found 1
124:17: E126 continuation line over-indented for hanging indent
125:71: E502 the backslash is redundant between brackets
127:22: E203 whitespace before ':'
128:23: E203 whitespace before ':'
129:23: E203 whitespace before ':'
130:28: E203 whitespace before ':'
130:35: E231 missing whitespace after ','
131:33: E203 whitespace before ':'
132:13: E126 continuation line over-indented for hanging indent
132:14: E231 missing whitespace after ','
133:23: E203 whitespace before ':'
134:30: E203 whitespace before ':'
134:74: E502 the backslash is redundant between brackets
136:33: E203 whitespace before ':'
137:22: E203 whitespace before ':'
138:24: E203 whitespace before ':'
139:13: E126 continuation line over-indented for hanging indent
141:1: E302 expected 2 blank lines, found 1
155:9: E112 expected an indented block
157:21: E126 continuation line over-indented for hanging indent
157:27: E203 whitespace before ':'
158:34: E203 whitespace before ':'
159:37: E203 whitespace before ':'
160:26: E203 whitespace before ':'
161:28: E203 whitespace before ':'
162:17: E121 continuation line under-indented for hanging indent
165:21: E126 continuation line over-indented for hanging indent
167:26: E203 whitespace before ':'
168:27: E203 whitespace before ':'
169:27: E203 whitespace before ':'
170:32: E203 whitespace before ':'
171:37: E203 whitespace before ':'
175:1: E302 expected 2 blank lines, found 1
177:11: E221 multiple spaces before operator
194:26: E221 multiple spaces before operator
194:26: E251 unexpected spaces around keyword / parameter equals
194:34: E251 unexpected spaces around keyword / parameter equals
195:25: E221 multiple spaces before operator
195:25: E251 unexpected spaces around keyword / parameter equals
195:34: E251 unexpected spaces around keyword / parameter equals
196:27: E221 multiple spaces before operator
196:27: E251 unexpected spaces around keyword / parameter equals
196:34: E251 unexpected spaces around keyword / parameter equals
197:29: E221 multiple spaces before operator
197:29: E251 unexpected spaces around keyword / parameter equals
197:34: E251 unexpected spaces around keyword / parameter equals
198:24: E221 multiple spaces before operator
198:24: E251 unexpected spaces around keyword / parameter equals
198:34: E251 unexpected spaces around keyword / parameter equals
199:29: E221 multiple spaces before operator
199:29: E251 unexpected spaces around keyword / parameter equals
199:34: E251 unexpected spaces around keyword / parameter equals
200:29: E221 multiple spaces before operator
200:29: E251 unexpected spaces around keyword / parameter equals
200:34: E251 unexpected spaces around keyword / parameter equals
201:32: E251 unexpected spaces around keyword / parameter equals
201:34: E251 unexpected spaces around keyword / parameter equals
202:24: E221 multiple spaces before operator
202:24: E251 unexpected spaces around keyword / parameter equals
202:34: E251 unexpected spaces around keyword / parameter equals
205:5: E303 too many blank lines (2)
236:32: E203 whitespace before ':'
237:33: E203 whitespace before ':'
238:27: E203 whitespace before ':'
238:59: E221 multiple spaces before operator
239:35: E203 whitespace before ':'
290:1: E302 expected 2 blank lines, found 1
307:1: E302 expected 2 blank lines, found 1
347:50: E128 continuation line under-indented for visual indent
350:1: E302 expected 2 blank lines, found 1
371:55: E251 unexpected spaces around keyword / parameter equals
371:57: E251 unexpected spaces around keyword / parameter equals
386:9: E128 continuation line under-indented for visual indent
387:9: E128 continuation line under-indented for visual indent
387:9: E129 visually indented line with same indent as next logical line
391:55: E502 the backslash is redundant between brackets
392:77: E502 the backslash is redundant between brackets
393:66: E502 the backslash is redundant between brackets
394:72: E502 the backslash is redundant between brackets
395:64: E502 the backslash is redundant between brackets
404:76: E502 the backslash is redundant between brackets
405:78: E502 the backslash is redundant between brackets
406:77: E502 the backslash is redundant between brackets
409:80: E502 the backslash is redundant between brackets
418:57: E502 the backslash is redundant between brackets
421:73: E502 the backslash is redundant between brackets
427:77: E502 the backslash is redundant between brackets
449:1: E302 expected 2 blank lines, found 1
455:21: E711 comparison to None should be 'if cond is not None:'
457:33: E711 comparison to None should be 'if cond is not None:'
518:25: E711 comparison to None should be 'if cond is not None:'
527:25: E711 comparison to None should be 'if cond is not None:'
642:65: E502 the backslash is redundant between brackets
652:40: E711 comparison to None should be 'if cond is None:'
694:39: E231 missing whitespace after ','
700:32: E711 comparison to None should be 'if cond is None:'
794:77: E502 the backslash is redundant between brackets
796:35: E261 at least two spaces before inline comment
858:77: E502 the backslash is redundant between brackets
859:57: E502 the backslash is redundant between brackets
860:75: E502 the backslash is redundant between brackets
863:53: E261 at least two spaces before inline comment
864:52: E111 indentation is not a multiple of four
864:52: E113 unexpected indentation
872:17: E125 continuation line with same indent as next logical line
879:25: E126 continuation line over-indented for hanging indent
884:122: E502 the backslash is redundant between brackets
885:36: E128 continuation line under-indented for visual indent
885:53: E502 the backslash is redundant between brackets
886:36: E128 continuation line under-indented for visual indent
886:71: E502 the backslash is redundant between brackets
887:36: E128 continuation line under-indented for visual indent
929:17: E128 continuation line under-indented for visual indent
936:79: E502 the backslash is redundant between brackets
950:67: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
959:73: E502 the backslash is redundant between brackets
990:80: E502 the backslash is redundant between brackets
991:78: E502 the backslash is redundant between brackets
998:80: E502 the backslash is redundant between brackets
999:78: E502 the backslash is redundant between brackets
1005:27: E711 comparison to None should be 'if cond is not None:'
1009:31: E712 comparison to True should be 'if cond is True:' or 'if cond:'
1018:73: E502 the backslash is redundant between brackets
1029:73: E502 the backslash is redundant between brackets
1046:21: E128 continuation line under-indented for visual indent
1066:75: E251 unexpected spaces around keyword / parameter equals
1066:77: E251 unexpected spaces around keyword / parameter equals
1066:78: E502 the backslash is redundant between brackets
1067:46: E127 continuation line over-indented for visual indent
1067:61: E502 the backslash is redundant between brackets
1068:46: E127 continuation line over-indented for visual indent
1068:64: E251 unexpected spaces around keyword / parameter equals
1068:66: E251 unexpected spaces around keyword / parameter equals
1068:67: E502 the backslash is redundant between brackets
1069:50: E127 continuation line over-indented for visual indent
1074:76: E251 unexpected spaces around keyword / parameter equals
1074:78: E251 unexpected spaces around keyword / parameter equals
1074:79: E502 the backslash is redundant between brackets
1075:46: E127 continuation line over-indented for visual indent
1075:77: E251 unexpected spaces around keyword / parameter equals
1075:79: E251 unexpected spaces around keyword / parameter equals
1075:80: E502 the backslash is redundant between brackets
1076:49: E127 continuation line over-indented for visual indent
1079:65: E261 at least two spaces before inline comment
1079:66: E262 inline comment should start with '# '
1080:59: E111 indentation is not a multiple of four
1082:44: E126 continuation line over-indented for hanging indent
1085:70: E211 whitespace before '['
1087:76: E502 the backslash is redundant between brackets
1088:63: E502 the backslash is redundant between brackets
1089:67: E251 unexpected spaces around keyword / parameter equals
1089:69: E251 unexpected spaces around keyword / parameter equals
1089:70: E502 the backslash is redundant between brackets
1090:54: E127 continuation line over-indented for visual indent
1090:77: E502 the backslash is redundant between brackets
1091:70: E251 unexpected spaces around keyword / parameter equals
1091:72: E251 unexpected spaces around keyword / parameter equals
1091:73: E502 the backslash is redundant between brackets
1092:54: E127 continuation line over-indented for visual indent
1097:44: E261 at least two spaces before inline comment
1099:42: E261 at least two spaces before inline comment
1100:43: E111 indentation is not a multiple of four
1100:43: E113 unexpected indentation
1103:66: E502 the backslash is redundant between brackets
1104:17: E128 continuation line under-indented for visual indent
1104:37: E251 unexpected spaces around keyword / parameter equals
1104:39: E251 unexpected spaces around keyword / parameter equals
1108:38: E711 comparison to None should be 'if cond is not None:'
1110:21: E128 continuation line under-indented for visual indent
1115:19: E128 continuation line under-indented for visual indent
1120:13: E128 continuation line under-indented for visual indent
1120:46: E251 unexpected spaces around keyword / parameter equals
1121:13: E122 continuation line missing indentation or outdented
1124:13: E128 continuation line under-indented for visual indent
1130:13: E128 continuation line under-indented for visual indent
1133:42: E203 whitespace before ','
1135:79: E502 the backslash is redundant between brackets
1141:17: E128 continuation line under-indented for visual indent
1148:18: E261 at least two spaces before inline comment
1151:17: E128 continuation line under-indented for visual indent
1166:29: E128 continuation line under-indented for visual indent
1174:33: E128 continuation line under-indented for visual indent
1190:48: E502 the backslash is redundant between brackets
1191:57: E502 the backslash is redundant between brackets
1192:64: E502 the backslash is redundant between brackets
1213:9: E113 unexpected indentation
1231:77: E502 the backslash is redundant between brackets
1232:77: E502 the backslash is redundant between brackets
1261:64: E261 at least two spaces before inline comment
1261:65: E262 inline comment should start with '# '
1262:43: E261 at least two spaces before inline comment
1262:44: E262 inline comment should start with '# '
1299:70: E502 the backslash is redundant between brackets
1300:21: E128 continuation line under-indented for visual indent
1301:31: E261 at least two spaces before inline comment
1301:32: E262 inline comment should start with '# '
1305:70: E502 the backslash is redundant between brackets
1342:36: E127 continuation line over-indented for visual indent
1343:36: E127 continuation line over-indented for visual indent
1359:28: E231 missing whitespace after ':'
1359:46: E231 missing whitespace after ':'
1359:63: E231 missing whitespace after ':'
1360:29: E231 missing whitespace after ':'
1360:46: E231 missing whitespace after ':'
1360:64: E231 missing whitespace after ':'
1361:27: E231 missing whitespace after ':'
1364:28: E201 whitespace after '['
1365:9: E128 continuation line under-indented for visual indent
1366:13: E128 continuation line under-indented for visual indent
1367:9: E128 continuation line under-indented for visual indent
1367:27: E202 whitespace before ']'
1530:37: E231 missing whitespace after ':'
1530:55: E231 missing whitespace after ':'
1530:72: E231 missing whitespace after ':'
1531:16: E128 continuation line under-indented for visual indent
1531:29: E231 missing whitespace after ':'
1531:46: E231 missing whitespace after ':'
1531:64: E231 missing whitespace after ':'
1532:16: E128 continuation line under-indented for visual indent
1532:27: E231 missing whitespace after ':'
1539:13: E126 continuation line over-indented for hanging indent
1557:13: E128 continuation line under-indented for visual indent
1575:17: E222 multiple spaces after operator
1578:23: E228 missing whitespace around modulo operator
1579:26: E127 continuation line over-indented for visual indent
1584:42: E128 continuation line under-indented for visual indent
1585:42: E128 continuation line under-indented for visual indent
1595:37: E128 continuation line under-indented for visual indent
1596:37: E128 continuation line under-indented for visual indent
1607:5: E303 too many blank lines (2)
1611:1: E302 expected 2 blank lines, found 1
117:D400: First line should end with '.', not ':'
117:D205: Blank line missing between one-line summary and description
141:D400: First line should end with '.', not 's'
141:D205: Blank line missing between one-line summary and description
290:D400: First line should end with '.', not 'h'
290:D205: Blank line missing between one-line summary and description
300:D400: First line should end with '.', not 'd'
300:D200: One-line docstring should not occupy 2 lines
307:D400: First line should end with '.', not 'D'
307:D205: Blank line missing between one-line summary and description
327:D202: No blank lines allowed *after* function docstring, found 1
327:D400: First line should end with '.', not 's'
350:D400: First line should end with '.', not 'r'
350:D205: Blank line missing between one-line summary and description
449:D400: First line should end with '.', not 's'
500:D400: First line should end with '.', not 'f'
500:D205: Blank line missing between one-line summary and description
532:D400: First line should end with '.', not 'r'
532:D205: Blank line missing between one-line summary and description
936:D202: No blank lines allowed *after* function docstring, found 1
936:D400: First line should end with '.', not 'g'
936:D205: Blank line missing between one-line summary and description
1199:D400: First line should end with '.', not 'e'
1199:D205: Blank line missing between one-line summary and description
1286:D200: One-line docstring should not occupy 3 lines
1326:D401: First line should be imperative: 'Add', not 'Adds'
1326:D400: First line should end with '.', not ')'
1326:D205: Blank line missing between one-line summary and description
1348:D400: First line should end with '.', not 's'
1372:D400: First line should end with '.', not 'l'
1372:D205: Blank line missing between one-line summary and description
1413:D202: No blank lines allowed *after* function docstring, found 1
1413:D400: First line should end with '.', not 'd'
1475:D400: First line should end with '.', not 'g'
1475:D200: One-line docstring should not occupy 3 lines
1507:D400: First line should end with '.', not 'F'
1507:D200: One-line docstring should not occupy 2 lines
1527:D400: First line should end with '.', not 't'
1527:D200: One-line docstring should not occupy 2 lines
1544:D400: First line should end with '.', not 'o'
1544:D205: Blank line missing between one-line summary and description
1562:D401: First line should be imperative: 'Return', not 'Returns'
1562:D400: First line should end with '.', not 't'
1611:D400: First line should end with '.', not 's'
1661:D400: First line should end with '.', not 'e'
1674:D209: Put multi-line docstring closing quotes on separate line
1674:D400: First line should end with '.', not 'e'
1674:D205: Blank line missing between one-line summary and description