WebComment: general comment format improvements

* Introduces the CFG_WEBCOMMENT_ENABLE_HTML_EMAILS config variable.
  When True, emails will also include HTML content.

* Introduces the body_format column for cmtRECORDCOMMENT that describes
  the format of the body of each comment ("HTML", "TEXT", etc.).

* Handles comments appropriately when storing and displaying them,
  according to their body format and desired output format. (closes #2064)

Co-Authored-By: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
Signed-off-by: Nikolaos Kasioumis <nikolaos.kasioumis@cern.ch>
1: D290 White spaces around docstring should be trimmed.
1: D400 First line should end with '.', not 's'
25:1: F401 're' imported but unused
35:29: E126 continuation line over-indented for hanging indent
40:1: F401 'CFG_WEBCOMMENT_ENABLE_HTML_EMAILS' imported but unused
66:1: E302 expected 2 blank lines, found 1
66: D203 Expected 1 blank line *before* class docstring, found 0
66: D400 First line should end with '.', not 'l'
69: D202 No blank lines allowed *after* method docstring, found 1
69: D400 First line should end with '.', not 'd'
69: D205 Blank line missing between one-line summary and description
103:13: F841 local variable 'last_comment_round_name' is assigned to but never used
109:139: E221 multiple spaces before operator
112:85: E231 missing whitespace after ','
112:87: E221 multiple spaces before operator
142:34: E127 continuation line over-indented for visual indent
154:13: E128 continuation line under-indented for visual indent
156:33: E203 whitespace before ':'
161:36: E225 missing whitespace around operator
162:168: E502 the backslash is redundant between brackets
162:57: E225 missing whitespace around operator
163:67: E127 continuation line over-indented for visual indent
166:13: E124 closing bracket does not match visual indentation
180:14: E127 continuation line over-indented for visual indent
182:14: E124 closing bracket does not match visual indentation
186: D401 First line should be imperative: 'Display', not 'Displays'
186: D205 Blank line missing between one-line summary and description
211: D400 First line should end with '.', not 'd'
211: D205 Blank line missing between one-line summary and description
245:26: E201 whitespace after '{'
245:45: E203 whitespace before ':'
245:22: E222 multiple spaces after operator
246:46: E203 whitespace before ':'
247:44: E203 whitespace before ':'
248:44: E203 whitespace before ':'
249:44: E203 whitespace before ':'
249:62: E261 at least two spaces before inline comment
249:63: E262 inline comment should start with '# '
250:44: E203 whitespace before ':'
250:62: E261 at least two spaces before inline comment
250:63: E262 inline comment should start with '# '
251:25: E124 closing bracket does not match visual indentation
261:13: F841 local variable 'last_comment_round_name' is assigned to but never used
289:106: E231 missing whitespace after ':'
289:143: E231 missing whitespace after ':'
290:32: E222 multiple spaces after operator
312:37: E225 missing whitespace around operator
332:13: E122 continuation line missing indentation or outdented
332:14: E201 whitespace after '{'
332:40: E203 whitespace before ':'
333:40: E203 whitespace before ':'
334:40: E203 whitespace before ':'
335:40: E203 whitespace before ':'
336:40: E203 whitespace before ':'
337:40: E203 whitespace before ':'
338:40: E203 whitespace before ':'
339:40: E203 whitespace before ':'
340:41: E203 whitespace before ':'
341:60: E225 missing whitespace around operator
342:40: E203 whitespace before ':'
343:13: E124 closing bracket does not match visual indentation
355:28: E128 continuation line under-indented for visual indent
356:28: E128 continuation line under-indented for visual indent
359: D400 First line should end with '.', not 'n'
359: D205 Blank line missing between one-line summary and description
404:35: E128 continuation line under-indented for visual indent
405:35: E126 continuation line over-indented for hanging indent
410:81: E225 missing whitespace around operator
410:100: E225 missing whitespace around operator
412:83: E225 missing whitespace around operator
435:105: E225 missing whitespace around operator
437:106: E225 missing whitespace around operator
443:110: E225 missing whitespace around operator
454:111: E271 multiple spaces after keyword
463:37: E126 continuation line over-indented for hanging indent
490:17: E127 continuation line over-indented for visual indent
490:33: E203 whitespace before ':'
491:33: E203 whitespace before ':'
492:33: E203 whitespace before ':'
502: D400 First line should end with '.', not 'n'
502: D205 Blank line missing between one-line summary and description
541:107: E231 missing whitespace after ':'
550:14: E111 indentation is not a multiple of four
576:94: E225 missing whitespace around operator
582:99: E225 missing whitespace around operator
597:31: E203 whitespace before ':'
598:16: E128 continuation line under-indented for visual indent
599:16: E128 continuation line under-indented for visual indent
599:31: E203 whitespace before ':'
600:16: E128 continuation line under-indented for visual indent
600:31: E203 whitespace before ':'
601:16: E128 continuation line under-indented for visual indent
602:16: E128 continuation line under-indented for visual indent
602:31: E203 whitespace before ':'
603:16: E128 continuation line under-indented for visual indent
603:31: E203 whitespace before ':'
604:16: E128 continuation line under-indented for visual indent
604:31: E203 whitespace before ':'
605:16: E124 closing bracket does not match visual indentation
608: D400 First line should end with '.', not 's'
608: D205 Blank line missing between one-line summary and description
617:55: E231 missing whitespace after ','
701:13: F841 local variable 'c_round_name' is assigned to but never used
702:13: F841 local variable 'c_restriction' is assigned to but never used
712:26: E201 whitespace after '{'
712:45: E203 whitespace before ':'
712:22: E222 multiple spaces after operator
713:46: E203 whitespace before ':'
714:44: E203 whitespace before ':'
715:44: E203 whitespace before ':'
716:44: E203 whitespace before ':'
717:44: E203 whitespace before ':'
718:44: E203 whitespace before ':'
719:44: E203 whitespace before ':'
720:44: E203 whitespace before ':'
721:44: E203 whitespace before ':'
722:25: E124 closing bracket does not match visual indentation
729:22: E201 whitespace after '{'
729:37: E203 whitespace before ':'
729:19: E222 multiple spaces after operator
730:42: E203 whitespace before ':'
731:36: E203 whitespace before ':'
732:36: E203 whitespace before ':'
734:36: E203 whitespace before ':'
735:36: E203 whitespace before ':'
736:36: E203 whitespace before ':'
737:36: E203 whitespace before ':'
746:13: F841 local variable 'last_comment_round_name' is assigned to but never used
757:20: E127 continuation line over-indented for visual indent
764:35: E127 continuation line over-indented for visual indent
764:73: E221 multiple spaces before operator
773:132: E202 whitespace before ')'
774:33: E127 continuation line over-indented for visual indent
774:71: E221 multiple spaces before operator
775:140: E225 missing whitespace around operator
848:66: E261 at least two spaces before inline comment
856:275: E231 missing whitespace after ':'
857:163: E231 missing whitespace after ':'
890:38: E203 whitespace before ':'
890:62: E231 missing whitespace after ':'
892:38: E203 whitespace before ':'
892:61: E231 missing whitespace after ':'
893:38: E203 whitespace before ':'
893:63: E231 missing whitespace after ':'
895:35: E203 whitespace before ':'
946:57: E251 unexpected spaces around keyword / parameter equals
946:59: E251 unexpected spaces around keyword / parameter equals
970:9: E122 continuation line missing indentation or outdented
970:10: E201 whitespace after '{'
973:32: E203 whitespace before ':'
974:38: E203 whitespace before ':'
974:58: E225 missing whitespace around operator
975:40: E203 whitespace before ':'
976:40: E203 whitespace before ':'
977:40: E203 whitespace before ':'
978:40: E203 whitespace before ':'
979:41: E203 whitespace before ':'
980:40: E203 whitespace before ':'
981:40: E203 whitespace before ':'
982:40: E203 whitespace before ':'
984:40: E203 whitespace before ':'
985:76: E502 the backslash is redundant between brackets
985:40: E203 whitespace before ':'
986:40: E127 continuation line over-indented for visual indent
986:74: E502 the backslash is redundant between brackets
987:40: E127 continuation line over-indented for visual indent
987:59: E502 the backslash is redundant between brackets
989:40: E203 whitespace before ':'
990:9: E124 closing bracket does not match visual indentation
1034:9: E122 continuation line missing indentation or outdented
1035:47: E203 whitespace before ','
1037:43: E225 missing whitespace around operator
1049:112: E502 the backslash is redundant between brackets
1049:87: E225 missing whitespace around operator
1049:106: E225 missing whitespace around operator
1057:112: E502 the backslash is redundant between brackets
1057:87: E225 missing whitespace around operator
1057:106: E225 missing whitespace around operator
1071: D401 First line should be imperative: 'print', not 'prints'
1071: D400 First line should end with '.', not 'm'
1079: D202 No blank lines allowed *after* method docstring, found 1
1079: D400 First line should end with '.', not 'n'
1079: D205 Blank line missing between one-line summary and description
1091:15: E221 multiple spaces before operator
1124: D400 First line should end with '.', not 'n'
1124: D205 Blank line missing between one-line summary and description
1142:15: E221 multiple spaces before operator
1144:9: E122 continuation line missing indentation or outdented
1145:9: E128 continuation line under-indented for visual indent
1146:9: E128 continuation line under-indented for visual indent
1163: D400 First line should end with '.', not 's'
1163: D205 Blank line missing between one-line summary and description
1183:22: E201 whitespace after '{'
1183:40: E203 whitespace before ':'
1184:40: E203 whitespace before ':'
1184:65: E202 whitespace before '}'
1189: D400 First line should end with '.', not 'r'
1189: D205 Blank line missing between one-line summary and description
1196:9: F841 local variable '_' is assigned to but never used
1205: D400 First line should end with '.', not 's'
1205: D205 Blank line missing between one-line summary and description
1224:22: E201 whitespace after '{'
1224:37: E203 whitespace before ':'
1224:19: E222 multiple spaces after operator
1225:42: E203 whitespace before ':'
1226:36: E203 whitespace before ':'
1227:36: E203 whitespace before ':'
1228:36: E203 whitespace before ':'
1229:36: E203 whitespace before ':'
1248:24: E222 multiple spaces after operator
1278:13: E122 continuation line missing indentation or outdented
1279:121: E502 the backslash is redundant between brackets
1280:28: E127 continuation line over-indented for visual indent
1281:100: E502 the backslash is redundant between brackets
1282:31: E127 continuation line over-indented for visual indent
1283:238: E271 multiple spaces after keyword
1286:14: E111 indentation is not a multiple of four
1287:43: E128 continuation line under-indented for visual indent
1288:43: E128 continuation line under-indented for visual indent
1289:43: E128 continuation line under-indented for visual indent
1290:43: E128 continuation line under-indented for visual indent
1291:43: E128 continuation line under-indented for visual indent
1292:43: E128 continuation line under-indented for visual indent
1293:43: E128 continuation line under-indented for visual indent
1293:54: E251 unexpected spaces around keyword / parameter equals
1293:56: E251 unexpected spaces around keyword / parameter equals
1294:43: E128 continuation line under-indented for visual indent
1295:43: E128 continuation line under-indented for visual indent
1304:54: E251 unexpected spaces around keyword / parameter equals
1304:56: E251 unexpected spaces around keyword / parameter equals
1339: D400 First line should end with '.', not 's'
1339: D205 Blank line missing between one-line summary and description
1357:22: E201 whitespace after '{'
1357:37: E203 whitespace before ':'
1357:19: E222 multiple spaces after operator
1358:42: E203 whitespace before ':'
1359:36: E203 whitespace before ':'
1360:36: E203 whitespace before ':'
1361:36: E203 whitespace before ':'
1362:36: E203 whitespace before ':'
1412:5: E128 continuation line under-indented for visual indent
1413:54: E251 unexpected spaces around keyword / parameter equals
1413:56: E251 unexpected spaces around keyword / parameter equals
1423:5: E128 continuation line under-indented for visual indent
1424:54: E251 unexpected spaces around keyword / parameter equals
1424:56: E251 unexpected spaces around keyword / parameter equals
1465:35: E203 whitespace before ':'
1465:42: E225 missing whitespace around operator
1466:35: E203 whitespace before ':'
1466:41: E225 missing whitespace around operator
1481: D400 First line should end with '.', not 'd'
1481: D205 Blank line missing between one-line summary and description
1488:22: E201 whitespace after '{'
1488:37: E203 whitespace before ':'
1488:19: E222 multiple spaces after operator
1489:42: E203 whitespace before ':'
1490:36: E203 whitespace before ':'
1491:36: E203 whitespace before ':'
1492:36: E203 whitespace before ':'
1493:36: E203 whitespace before ':'
1497:51: E221 multiple spaces before operator
1508:101: E222 multiple spaces after operator
1512: D401 First line should be imperative: 'Create', not 'Creates'
1512: D290 White spaces around docstring should be trimmed.
1512: D205 Blank line missing between one-line summary and description
1535:15: E221 multiple spaces before operator
1575: D400 First line should end with '.', not 'e'
1575: D200 One-line docstring should not occupy 3 lines
1601:19: E225 missing whitespace around operator
1605:36: E203 whitespace before ':'
1608:35: E203 whitespace before ':'
1609:35: E203 whitespace before ':'
1614:39: E225 missing whitespace around operator
1616: D400 First line should end with '.', not 'e'
1631:18: E225 missing whitespace around operator
1662: D400 First line should end with '.', not ')'
1662: D205 Blank line missing between one-line summary and description
1686:27: E127 continuation line over-indented for visual indent
1689:27: E127 continuation line over-indented for visual indent
1712:13: E201 whitespace after '{'
1712:25: E203 whitespace before ':'
1713:25: E203 whitespace before ':'
1714:25: E203 whitespace before ':'
1715:25: E203 whitespace before ':'
1717:26: E203 whitespace before ':'
1718:25: E203 whitespace before ':'
1719:25: E203 whitespace before ':'
1720:25: E203 whitespace before ':'
1750: D401 First line should be imperative: 'output', not 'outputs'
1750: D290 White spaces around docstring should be trimmed.
1750: D400 First line should end with '.', not 'd'
1754: D401 First line should be imperative: 'prepare', not 'prepares'
1754: D290 White spaces around docstring should be trimmed.
1754: D400 First line should end with '.', not 'r'
1769: D401 First line should be imperative: 'output', not 'outputs'
1769: D290 White spaces around docstring should be trimmed.
1769: D400 First line should end with '.', not 'w'
1784:34: E203 whitespace before ':'
1792: D400 First line should end with '.', not 't'
1792: D205 Blank line missing between one-line summary and description
1799:9: F841 local variable '_' is assigned to but never used
1838:17: E128 continuation line under-indented for visual indent
1838:50: E225 missing whitespace around operator
1838:69: E225 missing whitespace around operator
1839:17: E128 continuation line under-indented for visual indent
1839:36: E203 whitespace before ','
1839:23: E231 missing whitespace after ':'
1840:17: E128 continuation line under-indented for visual indent
1840:49: E203 whitespace before ','
1841:17: E128 continuation line under-indented for visual indent
1842:17: E128 continuation line under-indented for visual indent
1848:17: E128 continuation line under-indented for visual indent
1848:50: E225 missing whitespace around operator
1848:69: E225 missing whitespace around operator
1849:17: E128 continuation line under-indented for visual indent
1849:36: E203 whitespace before ','
1849:23: E231 missing whitespace after ':'
1850:17: E128 continuation line under-indented for visual indent
1851:17: E128 continuation line under-indented for visual indent
1856: D400 First line should end with '.', not 't'
1856: D205 Blank line missing between one-line summary and description
1862:9: F841 local variable '_' is assigned to but never used
1896:49: E225 missing whitespace around operator
1896:68: E225 missing whitespace around operator
1897:54: E272 multiple spaces before keyword
1899:49: E225 missing whitespace around operator
1899:68: E225 missing whitespace around operator
1900:54: E272 multiple spaces before keyword
1906:13: E128 continuation line under-indented for visual indent
1906:39: E203 whitespace before ','
1907:13: E128 continuation line under-indented for visual indent
1908:13: E128 continuation line under-indented for visual indent
1909:13: E128 continuation line under-indented for visual indent
1910:13: E128 continuation line under-indented for visual indent
1911:13: E128 continuation line under-indented for visual indent
1916: D400 First line should end with '.', not 't'
1916: D205 Blank line missing between one-line summary and description
1966:73: E261 at least two spaces before inline comment
1966:73: E262 inline comment should start with '# '
1968:81: E261 at least two spaces before inline comment
1968:81: E262 inline comment should start with '# '
1969:81: E261 at least two spaces before inline comment
1969:81: E262 inline comment should start with '# '
1970:81: E261 at least two spaces before inline comment
1970:81: E262 inline comment should start with '# '
1971:81: E261 at least two spaces before inline comment
1971:81: E262 inline comment should start with '# '
1972:82: E261 at least two spaces before inline comment
1972:82: E262 inline comment should start with '# '
1973:81: E261 at least two spaces before inline comment
1973:81: E262 inline comment should start with '# '
1975:81: E261 at least two spaces before inline comment
1975:81: E262 inline comment should start with '# '
1976:81: E261 at least two spaces before inline comment
1976:81: E262 inline comment should start with '# '
1977:81: E261 at least two spaces before inline comment
1977:81: E262 inline comment should start with '# '
1978:82: E261 at least two spaces before inline comment
1978:82: E262 inline comment should start with '# '
1980:76: E261 at least two spaces before inline comment
1980:76: E262 inline comment should start with '# '
1982:84: E261 at least two spaces before inline comment
1982:84: E262 inline comment should start with '# '
1983:84: E261 at least two spaces before inline comment
1983:84: E262 inline comment should start with '# '
1984:84: E261 at least two spaces before inline comment
1984:84: E262 inline comment should start with '# '
1985:84: E261 at least two spaces before inline comment
1985:84: E262 inline comment should start with '# '
1986:84: E261 at least two spaces before inline comment
1986:84: E262 inline comment should start with '# '
1987:84: E261 at least two spaces before inline comment
1987:84: E262 inline comment should start with '# '
1989:84: E262 inline comment should start with '# '
1990:84: E262 inline comment should start with '# '
1991:84: E262 inline comment should start with '# '
1992:84: E262 inline comment should start with '# '
1993:84: E262 inline comment should start with '# '
1995:83: E261 at least two spaces before inline comment
1998:65: E261 at least two spaces before inline comment
1998:66: E262 inline comment should start with '# '
1999:65: E261 at least two spaces before inline comment
1999:66: E262 inline comment should start with '# '
2000:66: E261 at least two spaces before inline comment
2000:66: E262 inline comment should start with '# '
2007:75: E261 at least two spaces before inline comment
2008:75: E261 at least two spaces before inline comment
2009:75: E261 at least two spaces before inline comment
2010:70: E261 at least two spaces before inline comment
2025:15: E128 continuation line under-indented for visual indent
2026:15: E128 continuation line under-indented for visual indent
2027:15: E128 continuation line under-indented for visual indent
2028:23: E211 whitespace before '('
2041:13: E122 continuation line missing indentation or outdented
2042:13: E122 continuation line missing indentation or outdented
2043:13: E122 continuation line missing indentation or outdented
2047:13: E122 continuation line missing indentation or outdented
2048:13: E122 continuation line missing indentation or outdented
2049:13: E122 continuation line missing indentation or outdented
2063:74: E222 multiple spaces after operator
2065:75: E222 multiple spaces after operator
2069:36: E225 missing whitespace around operator
2069:58: E225 missing whitespace around operator
2071:36: E225 missing whitespace around operator
2071:59: E225 missing whitespace around operator
2098: D400 First line should end with '.', not ','
2098: D205 Blank line missing between one-line summary and description
2110:37: E225 missing whitespace around operator
2110:86: E225 missing whitespace around operator
2122: D400 First line should end with '.', not ','
2122: D205 Blank line missing between one-line summary and description
2134:37: E225 missing whitespace around operator
2134:86: E225 missing whitespace around operator
2148:5: E303 too many blank lines (3)
2148: D400 First line should end with '.', not ','
2148: D205 Blank line missing between one-line summary and description
2160:37: E225 missing whitespace around operator
2160:86: E225 missing whitespace around operator
2172: D202 No blank lines allowed *after* method docstring, found 1
2172: D400 First line should end with '.', not ')'
2182:21: E126 continuation line over-indented for hanging indent
2185:26: E225 missing whitespace around operator
2221:9: E122 continuation line missing indentation or outdented
2222:9: E122 continuation line missing indentation or outdented
2223:9: E122 continuation line missing indentation or outdented
2224:9: E122 continuation line missing indentation or outdented
2225:9: E122 continuation line missing indentation or outdented
2226:9: E122 continuation line missing indentation or outdented
2227:9: E122 continuation line missing indentation or outdented
2228:9: E124 closing bracket does not match visual indentation
2231: D401 First line should be imperative: 'Print', not 'Prints'
2231: D400 First line should end with '.', not 'w'
2231: D205 Blank line missing between one-line summary and description
2260:15: E127 continuation line over-indented for visual indent
2260:109: E502 the backslash is redundant between brackets
2262:16: E127 continuation line over-indented for visual indent
2272:35: E231 missing whitespace after ','
2276: D401 First line should be imperative: 'Print', not 'Prints'
2276: D202 No blank lines allowed *after* method docstring, found 1
2276: D400 First line should end with '.', not 'w'
2276: D205 Blank line missing between one-line summary and description
2308:16: E121 continuation line under-indented for hanging indent
2308:89: E502 the backslash is redundant between brackets
2308:51: E225 missing whitespace around operator
2308:70: E225 missing whitespace around operator
2312:76: E221 multiple spaces before operator
2313:16: E121 continuation line under-indented for hanging indent
2313:89: E502 the backslash is redundant between brackets
2313:51: E225 missing whitespace around operator
2313:70: E225 missing whitespace around operator
2320:20: E121 continuation line under-indented for hanging indent
2320:93: E502 the backslash is redundant between brackets
2320:55: E225 missing whitespace around operator
2320:74: E225 missing whitespace around operator
2324:85: E221 multiple spaces before operator
2325:20: E121 continuation line under-indented for hanging indent
2325:93: E502 the backslash is redundant between brackets
2325:55: E225 missing whitespace around operator
2325:74: E225 missing whitespace around operator
2332:20: E121 continuation line under-indented for hanging indent
2332:93: E502 the backslash is redundant between brackets
2332:55: E225 missing whitespace around operator
2332:74: E225 missing whitespace around operator
2336:16: E128 continuation line under-indented for visual indent
2339:20: E121 continuation line under-indented for hanging indent
2339:93: E502 the backslash is redundant between brackets
2339:55: E225 missing whitespace around operator
2339:74: E225 missing whitespace around operator
2343:16: E128 continuation line under-indented for visual indent
2346:35: E231 missing whitespace after ','
2350: D401 First line should be imperative: 'Print', not 'Prints'
2350: D400 First line should end with '.', not 'e'
2350: D205 Blank line missing between one-line summary and description
2389:15: E271 multiple spaces after keyword
2391: D202 No blank lines allowed *after* method docstring, found 1
2391: D400 First line should end with '.', not 'e'
2391: D205 Blank line missing between one-line summary and description
2429: D400 First line should end with '.', not 'r'
2474:55: E231 missing whitespace after ','
2482:22: E222 multiple spaces after operator
2518:9: E303 too many blank lines (3)
2586:34: E126 continuation line over-indented for hanging indent
2589:102: E502 the backslash is redundant between brackets
2589:77: E225 missing whitespace around operator
2589:96: E225 missing whitespace around operator
2594:98: E502 the backslash is redundant between brackets
2594:73: E225 missing whitespace around operator
2594:92: E225 missing whitespace around operator
2618:25: E127 continuation line over-indented for visual indent
2618:37: E203 whitespace before ':'
2619:37: E203 whitespace before ':'
2620:37: E203 whitespace before ':'
2621:37: E203 whitespace before ':'
2622:37: E203 whitespace before ':'
2623:37: E203 whitespace before ':'
2628:24: E261 at least two spaces before inline comment
2633:16: E127 continuation line over-indented for visual indent
2660:52: E126 continuation line over-indented for hanging indent
2678: D401 First line should be imperative: 'Prepare', not 'Prepares'
2678: D202 No blank lines allowed *after* method docstring, found 1
2678: D400 First line should end with '.', not 't'
2678: D200 One-line docstring should not occupy 3 lines