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'
30:1: F401 're' imported but unused
67:31: E126 continuation line over-indented for hanging indent
81:6: E126 continuation line over-indented for hanging indent
92:1: E302 expected 2 blank lines, found 1
92: D401 First line should be imperative: 'Return', not 'Returns'
92: D205 Blank line missing between one-line summary and description
147:29: E271 multiple spaces after keyword
223:33: E261 at least two spaces before inline comment
224:15: E271 multiple spaces after keyword
225:49: E203 whitespace before ':'
227:49: E203 whitespace before ':'
227:51: E202 whitespace before ']'
228:14: E261 at least two spaces before inline comment
242:79: E261 at least two spaces before inline comment
249:8: E111 indentation is not a multiple of four
328:84: E502 the backslash is redundant between brackets
328:84: E251 unexpected spaces around keyword / parameter equals
330:88: E502 the backslash is redundant between brackets
330:88: E251 unexpected spaces around keyword / parameter equals
335:1: E302 expected 2 blank lines, found 1
335: D400 First line should end with '.', not 'w'
335: D205 Blank line missing between one-line summary and description
360:1: E302 expected 2 blank lines, found 1
360: D290 White spaces around docstring should be trimmed.
360: D400 First line should end with '.', not 's'
360: D205 Blank line missing between one-line summary and description
389:1: E302 expected 2 blank lines, found 1
389: D290 White spaces around docstring should be trimmed.
389: D400 First line should end with '.', not 's'
389: D205 Blank line missing between one-line summary and description
412:1: E302 expected 2 blank lines, found 1
412: D401 First line should be imperative: 'Check', not 'Checks'
412: D290 White spaces around docstring should be trimmed.
412: D400 First line should end with '.', not 'd'
412: D205 Blank line missing between one-line summary and description
434:1: E302 expected 2 blank lines, found 1
434: D400 First line should end with '.', not 'n'
434: D200 One-line docstring should not occupy 3 lines
443:1: E302 expected 2 blank lines, found 1
443: D200 One-line docstring should not occupy 3 lines
449:10: E222 multiple spaces after operator
451:49: E231 missing whitespace after ','
454:1: E302 expected 2 blank lines, found 1
454: D205 Blank line missing between one-line summary and description
521:17: E127 continuation line over-indented for visual indent
521:18: E201 whitespace after '{'
521:44: E203 whitespace before ':'
522:44: E203 whitespace before ':'
523:44: E203 whitespace before ':'
524:44: E203 whitespace before ':'
525:44: E203 whitespace before ':'
526:44: E203 whitespace before ':'
527:80: E502 the backslash is redundant between brackets
527:44: E203 whitespace before ':'
528:47: E127 continuation line over-indented for visual indent
528:130: E502 the backslash is redundant between brackets
530:44: E203 whitespace before ':'
531:44: E203 whitespace before ':'
532:44: E203 whitespace before ':'
533:44: E203 whitespace before ':'
534:80: E502 the backslash is redundant between brackets
534:44: E203 whitespace before ':'
536:44: E203 whitespace before ':'
537:44: E203 whitespace before ':'
537:65: E225 missing whitespace around operator
537:84: E225 missing whitespace around operator
538:44: E203 whitespace before ':'
538:64: E261 at least two spaces before inline comment
538:65: E262 inline comment should start with '# '
539:17: E124 closing bracket does not match visual indentation
578:5: E122 continuation line missing indentation or outdented
578:28: E203 whitespace before ':'
579:5: E122 continuation line missing indentation or outdented
579:28: E203 whitespace before ':'
580:5: E122 continuation line missing indentation or outdented
580:28: E203 whitespace before ':'
581:5: E122 continuation line missing indentation or outdented
581:28: E203 whitespace before ':'
582:5: E122 continuation line missing indentation or outdented
582:28: E203 whitespace before ':'
583:5: E122 continuation line missing indentation or outdented
583:28: E203 whitespace before ':'
584:5: E122 continuation line missing indentation or outdented
584:64: E502 the backslash is redundant between brackets
584:28: E203 whitespace before ':'
585:31: E126 continuation line over-indented for hanging indent
585:125: E502 the backslash is redundant between brackets
586:35: E131 continuation line unaligned for hanging indent
587:60: E131 continuation line unaligned for hanging indent
588:5: E122 continuation line missing indentation or outdented
588:28: E203 whitespace before ':'
589:5: E122 continuation line missing indentation or outdented
589:28: E203 whitespace before ':'
590:5: E122 continuation line missing indentation or outdented
590:28: E203 whitespace before ':'
591:5: E122 continuation line missing indentation or outdented
591:28: E203 whitespace before ':'
592:5: E122 continuation line missing indentation or outdented
592:64: E502 the backslash is redundant between brackets
592:28: E203 whitespace before ':'
594:60: E131 continuation line unaligned for hanging indent
595:5: E122 continuation line missing indentation or outdented
595:28: E203 whitespace before ':'
596:5: E122 continuation line missing indentation or outdented
596:28: E203 whitespace before ':'
596:49: E225 missing whitespace around operator
596:68: E225 missing whitespace around operator
597:5: E122 continuation line missing indentation or outdented
597:28: E203 whitespace before ':'
597:49: E261 at least two spaces before inline comment
597:50: E262 inline comment should start with '# '
598:1: E122 continuation line missing indentation or outdented
612:1: E302 expected 2 blank lines, found 1
612: D401 First line should be imperative: 'Check', not 'Checks'
612: D290 White spaces around docstring should be trimmed.
612: D400 First line should end with '.', not 't'
612: D205 Blank line missing between one-line summary and description
634:1: E302 expected 2 blank lines, found 1
634: D400 First line should end with '.', not 'n'
634: D205 Blank line missing between one-line summary and description
651: D400 First line should end with '.', not 'r'
651: D205 Blank line missing between one-line summary and description
674:1: E302 expected 2 blank lines, found 1
674: D400 First line should end with '.', not 't'
674: D205 Blank line missing between one-line summary and description
698:17: E225 missing whitespace around operator
703:1: E302 expected 2 blank lines, found 1
703: D400 First line should end with '.', not 't'
703: D205 Blank line missing between one-line summary and description
724:1: E302 expected 2 blank lines, found 1
724: D400 First line should end with '.', not 'n'
724: D205 Blank line missing between one-line summary and description
736:17: E225 missing whitespace around operator
749:1: E302 expected 2 blank lines, found 1
749: D400 First line should end with '.', not 'n'
749: D205 Blank line missing between one-line summary and description
771:22: E201 whitespace after '{'
771:31: E203 whitespace before ':'
771:17: E222 multiple spaces after operator
772:31: E203 whitespace before ':'
773:31: E203 whitespace before ':'
774:31: E203 whitespace before ':'
775:31: E203 whitespace before ':'
776:31: E203 whitespace before ':'
777:21: E124 closing bracket does not match visual indentation
814:38: E203 whitespace before ':'
815:38: E203 whitespace before ':'
816:1: E128 continuation line under-indented for visual indent
817:1: E128 continuation line under-indented for visual indent
818:38: E203 whitespace before ':'
819:16: E128 continuation line under-indented for visual indent
820:16: E128 continuation line under-indented for visual indent
889:1: E302 expected 2 blank lines, found 1
889: D401 First line should be imperative: 'Return', not 'Returns'
889: D400 First line should end with '.', not 'm'
889: D205 Blank line missing between one-line summary and description
921:1: E302 expected 2 blank lines, found 1
921: D400 First line should end with '.', not 'o'
921: D205 Blank line missing between one-line summary and description
929:1: E302 expected 2 blank lines, found 1
929: D202 No blank lines allowed *after* function docstring, found 1
929: D400 First line should end with '.', not 'n'
929: D205 Blank line missing between one-line summary and description
955:5: F841 local variable 'msg_original' is assigned to but never used
1027: D400 First line should end with '.', not 'd'
1027: D205 Blank line missing between one-line summary and description
1038:35: E127 continuation line over-indented for visual indent
1057:1: E302 expected 2 blank lines, found 1
1057: D400 First line should end with '.', not 'r'
1057: D205 Blank line missing between one-line summary and description
1079:1: E302 expected 2 blank lines, found 1
1079: D401 First line should be imperative: 'Return', not 'Returns'
1079: D400 First line should end with '.', not ')'
1092:134: E502 the backslash is redundant between brackets
1092:36: E225 missing whitespace around operator
1092:55: E225 missing whitespace around operator
1097:1: E302 expected 2 blank lines, found 1
1097: D400 First line should end with '.', not 's'
1097: D205 Blank line missing between one-line summary and description
1115:1: E302 expected 2 blank lines, found 1
1135:1: E302 expected 2 blank lines, found 1
1135: D401 First line should be imperative: 'Return', not 'Returns'
1135: D400 First line should end with '.', not 's'
1135: D205 Blank line missing between one-line summary and description
1157:1: E302 expected 2 blank lines, found 1
1157: D401 First line should be imperative: 'Return', not 'Returns'
1201:16: E126 continuation line over-indented for hanging indent
1206:24: E713 test for membership should be 'not in'
1208:58: E502 the backslash is redundant between brackets
1213:49: E502 the backslash is redundant between brackets
1215:49: E502 the backslash is redundant between brackets
1216:73: E202 whitespace before ')'
1218:1: E302 expected 2 blank lines, found 1
1218: D202 No blank lines allowed *after* function docstring, found 1
1218: D205 Blank line missing between one-line summary and description
1266:25: E126 continuation line over-indented for hanging indent
1270:25: E126 continuation line over-indented for hanging indent
1295:30: E203 whitespace before ':'
1296:30: E203 whitespace before ':'
1297:30: E203 whitespace before ':'
1298:30: E203 whitespace before ':'
1299:30: E203 whitespace before ':'
1300:30: E203 whitespace before ':'
1301:30: E203 whitespace before ':'
1302:30: E203 whitespace before ':'
1307:18: E203 whitespace before ':'
1311:23: E203 whitespace before ':'
1312:21: E203 whitespace before ':'
1313:22: E203 whitespace before ':'
1314:22: E203 whitespace before ':'
1319:21: E203 whitespace before ':'
1320:21: E203 whitespace before ':'
1321:27: E203 whitespace before ':'
1322:26: E203 whitespace before ':'
1323:26: E203 whitespace before ':'
1324:17: E203 whitespace before ':'
1329:25: E203 whitespace before ':'
1332:25: E203 whitespace before ':'
1335:31: E203 whitespace before ':'
1340:31: E203 whitespace before ':'
1341:31: E203 whitespace before ':'
1371:1: E302 expected 2 blank lines, found 1
1371: D401 First line should be imperative: 'Return', not 'Returns'
1371: D400 First line should end with '.', not 'd'
1371: D205 Blank line missing between one-line summary and description
1392:16: E126 continuation line over-indented for hanging indent
1404:16: E126 continuation line over-indented for hanging indent
1412:1: E302 expected 2 blank lines, found 1
1412: D400 First line should end with '.', not 'n'
1412: D205 Blank line missing between one-line summary and description
1431:22: E231 missing whitespace after ':'
1431:29: E231 missing whitespace after ':'
1431:36: E231 missing whitespace after ':'
1431:43: E231 missing whitespace after ':'
1474:1: E302 expected 2 blank lines, found 1
1474: D401 First line should be imperative: 'Get', not 'Gets'
1474: D205 Blank line missing between one-line summary and description
1503:19: E261 at least two spaces before inline comment
1503:20: E262 inline comment should start with '# '
1522:10: E261 at least two spaces before inline comment
1522:11: E262 inline comment should start with '# '
1548:42: E261 at least two spaces before inline comment
1552:45: E261 at least two spaces before inline comment
1576:1: E302 expected 2 blank lines, found 1
1576: D400 First line should end with '.', not 'g'
1576: D200 One-line docstring should not occupy 3 lines
1584:30: W601 .has_key() is deprecated, use 'in'
1588:70: E502 the backslash is redundant between brackets
1591:1: E302 expected 2 blank lines, found 1
1591: D400 First line should end with '.', not 'n'
1591: D205 Blank line missing between one-line summary and description
1605:21: E222 multiple spaces after operator
1619:1: E302 expected 2 blank lines, found 1
1619: D202 No blank lines allowed *after* function docstring, found 1
1619: D400 First line should end with '.', not 'k'
1619: D205 Blank line missing between one-line summary and description
1667:5: F841 local variable 'actions' is assigned to but never used
1725:77: E225 missing whitespace around operator
1873:1: E302 expected 2 blank lines, found 1
1873: D401 First line should be imperative: 'Send', not 'Sends'
1873: D400 First line should end with '.', not 'D'
1873: D200 One-line docstring should not occupy 3 lines
1896:28: F841 local variable 'last_login' is assigned to but never used
1929:10: E201 whitespace after '{'
1929:36: E203 whitespace before ':'
1929:51: E222 multiple spaces after operator
1931:36: E203 whitespace before ':'
1931:51: E222 multiple spaces after operator
1932:36: E203 whitespace before ':'
1933:36: E203 whitespace before ':'
1934:36: E203 whitespace before ':'
1935:36: E203 whitespace before ':'
1936:36: E203 whitespace before ':'
1937:36: E203 whitespace before ':'
1938:36: E203 whitespace before ':'
1939:36: E203 whitespace before ':'
1940:36: E203 whitespace before ':'
1941:36: E203 whitespace before ':'
1942:36: E203 whitespace before ':'
1943:36: E203 whitespace before ':'
1944:9: E124 closing bracket does not match visual indentation
1978:5: E122 continuation line missing indentation or outdented
1978:28: E203 whitespace before ':'
1978:43: E222 multiple spaces after operator
1979:5: E122 continuation line missing indentation or outdented
1980:5: E122 continuation line missing indentation or outdented
1980:28: E203 whitespace before ':'
1980:43: E222 multiple spaces after operator
1981:5: E122 continuation line missing indentation or outdented
1981:28: E203 whitespace before ':'
1982:5: E122 continuation line missing indentation or outdented
1982:28: E203 whitespace before ':'
1983:5: E122 continuation line missing indentation or outdented
1983:28: E203 whitespace before ':'
1984:5: E122 continuation line missing indentation or outdented
1984:28: E203 whitespace before ':'
1985:5: E122 continuation line missing indentation or outdented
1985:28: E203 whitespace before ':'
1986:5: E122 continuation line missing indentation or outdented
1986:28: E203 whitespace before ':'
1987:5: E122 continuation line missing indentation or outdented
1987:28: E203 whitespace before ':'
1988:5: E122 continuation line missing indentation or outdented
1988:28: E203 whitespace before ':'
1989:5: E122 continuation line missing indentation or outdented
1989:28: E203 whitespace before ':'
1990:5: E122 continuation line missing indentation or outdented
1990:28: E203 whitespace before ':'
1991:5: E122 continuation line missing indentation or outdented
1991:28: E203 whitespace before ':'
1992:5: E122 continuation line missing indentation or outdented
1992:28: E203 whitespace before ':'
1993:1: E122 continuation line missing indentation or outdented
2015:1: E302 expected 2 blank lines, found 1
2015: D400 First line should end with '.', not '0'
2015: D205 Blank line missing between one-line summary and description
2035:26: E231 missing whitespace after ','
2074:1: E302 expected 2 blank lines, found 1
2074: D202 No blank lines allowed *after* function docstring, found 1
2074: D400 First line should end with '.', not 'e'
2074: D205 Blank line missing between one-line summary and description
2116:1: E302 expected 2 blank lines, found 1
2116: D401 First line should be imperative: 'Return', not 'Returns'
2116: D400 First line should end with '.', not 'e'
2116: D205 Blank line missing between one-line summary and description
2135:1: E302 expected 2 blank lines, found 1
2135: D400 First line should end with '.', not 'n'
2135: D205 Blank line missing between one-line summary and description
2152:1: E302 expected 2 blank lines, found 1
2152: D400 First line should end with '.', not ','
2152: D205 Blank line missing between one-line summary and description
2173:15: E271 multiple spaces after keyword
2176:1: E302 expected 2 blank lines, found 1
2176: D400 First line should end with '.', not 'n'
2176: D205 Blank line missing between one-line summary and description
2187:1: E302 expected 2 blank lines, found 1
2187: D400 First line should end with '.', not 'e'
2187: D205 Blank line missing between one-line summary and description
2203:1: E302 expected 2 blank lines, found 1
2203: D400 First line should end with '.', not 's'
2203: D205 Blank line missing between one-line summary and description
2215:1: E302 expected 2 blank lines, found 1
2215: D400 First line should end with '.', not 'e'
2215: D205 Blank line missing between one-line summary and description
2258:1: E302 expected 2 blank lines, found 1
2258: D400 First line should end with '.', not 'e'
2258: D200 One-line docstring should not occupy 3 lines
2270:1: E302 expected 2 blank lines, found 1
2270: D400 First line should end with '.', not 'e'
2284:1: E302 expected 2 blank lines, found 1
2319:114: E502 the backslash is redundant between brackets
2323:135: E502 the backslash is redundant between brackets
2326:125: E502 the backslash is redundant between brackets
2332:12: E127 continuation line over-indented for visual indent
2359:5: E303 too many blank lines (2)