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
1028: D400 First line should end with '.', not 'd'
1028: D205 Blank line missing between one-line summary and description
1039:35: E127 continuation line over-indented for visual indent
1058:1: E302 expected 2 blank lines, found 1
1058: D400 First line should end with '.', not 'r'
1058: D205 Blank line missing between one-line summary and description
1080:1: E302 expected 2 blank lines, found 1
1080: D401 First line should be imperative: 'Return', not 'Returns'
1080: D400 First line should end with '.', not ')'
1093:134: E502 the backslash is redundant between brackets
1093:36: E225 missing whitespace around operator
1093:55: E225 missing whitespace around operator
1098:1: E302 expected 2 blank lines, found 1
1098: D400 First line should end with '.', not 's'
1098: D205 Blank line missing between one-line summary and description
1116:1: E302 expected 2 blank lines, found 1
1136:1: E302 expected 2 blank lines, found 1
1136: D401 First line should be imperative: 'Return', not 'Returns'
1136: D400 First line should end with '.', not 's'
1136: D205 Blank line missing between one-line summary and description
1158:1: E302 expected 2 blank lines, found 1
1158: D401 First line should be imperative: 'Return', not 'Returns'
1202:16: E126 continuation line over-indented for hanging indent
1207:24: E713 test for membership should be 'not in'
1209:58: E502 the backslash is redundant between brackets
1214:49: E502 the backslash is redundant between brackets
1216:49: E502 the backslash is redundant between brackets
1217:73: E202 whitespace before ')'
1219:1: E302 expected 2 blank lines, found 1
1219: D202 No blank lines allowed *after* function docstring, found 1
1219: D205 Blank line missing between one-line summary and description
1267:25: E126 continuation line over-indented for hanging indent
1271:25: E126 continuation line over-indented for hanging indent
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 ':'
1303:30: E203 whitespace before ':'
1308:18: E203 whitespace before ':'
1312:23: E203 whitespace before ':'
1313:21: E203 whitespace before ':'
1314:22: E203 whitespace before ':'
1315:22: E203 whitespace before ':'
1320:21: E203 whitespace before ':'
1321:21: E203 whitespace before ':'
1322:27: E203 whitespace before ':'
1323:26: E203 whitespace before ':'
1324:26: E203 whitespace before ':'
1325:17: E203 whitespace before ':'
1330:25: E203 whitespace before ':'
1333:25: E203 whitespace before ':'
1336:31: E203 whitespace before ':'
1341:31: E203 whitespace before ':'
1342:31: E203 whitespace before ':'
1372:1: E302 expected 2 blank lines, found 1
1372: D401 First line should be imperative: 'Return', not 'Returns'
1372: D400 First line should end with '.', not 'd'
1372: D205 Blank line missing between one-line summary and description
1393:16: E126 continuation line over-indented for hanging indent
1405:16: E126 continuation line over-indented for hanging indent
1413:1: E302 expected 2 blank lines, found 1
1413: D400 First line should end with '.', not 'n'
1413: D205 Blank line missing between one-line summary and description
1432:22: E231 missing whitespace after ':'
1432:29: E231 missing whitespace after ':'
1432:36: E231 missing whitespace after ':'
1432:43: E231 missing whitespace after ':'
1475:1: E302 expected 2 blank lines, found 1
1475: D401 First line should be imperative: 'Get', not 'Gets'
1475: D205 Blank line missing between one-line summary and description
1504:19: E261 at least two spaces before inline comment
1504:20: E262 inline comment should start with '# '
1523:10: E261 at least two spaces before inline comment
1523:11: E262 inline comment should start with '# '
1549:42: E261 at least two spaces before inline comment
1553:45: E261 at least two spaces before inline comment
1577:1: E302 expected 2 blank lines, found 1
1577: D400 First line should end with '.', not 'g'
1577: D200 One-line docstring should not occupy 3 lines
1585:30: W601 .has_key() is deprecated, use 'in'
1589:70: E502 the backslash is redundant between brackets
1592:1: E302 expected 2 blank lines, found 1
1592: D400 First line should end with '.', not 'n'
1592: D205 Blank line missing between one-line summary and description
1606:21: E222 multiple spaces after operator
1620:1: E302 expected 2 blank lines, found 1
1620: D202 No blank lines allowed *after* function docstring, found 1
1620: D400 First line should end with '.', not 'k'
1620: D205 Blank line missing between one-line summary and description
1668:5: F841 local variable 'actions' is assigned to but never used
1726:77: E225 missing whitespace around operator
1874:1: E302 expected 2 blank lines, found 1
1874: D401 First line should be imperative: 'Send', not 'Sends'
1874: D400 First line should end with '.', not 'D'
1874: D200 One-line docstring should not occupy 3 lines
1897:28: F841 local variable 'last_login' is assigned to but never used
1930:10: E201 whitespace after '{'
1930:36: E203 whitespace before ':'
1930:51: E222 multiple spaces after operator
1932:36: E203 whitespace before ':'
1932:51: E222 multiple spaces after operator
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:36: E203 whitespace before ':'
1945:9: E124 closing bracket does not match visual indentation
1979:5: E122 continuation line missing indentation or outdented
1979:28: E203 whitespace before ':'
1979:43: E222 multiple spaces after operator
1980:5: E122 continuation line missing indentation or outdented
1981:5: E122 continuation line missing indentation or outdented
1981:28: E203 whitespace before ':'
1981:43: E222 multiple spaces after operator
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:5: E122 continuation line missing indentation or outdented
1993:28: E203 whitespace before ':'
1994:1: E122 continuation line missing indentation or outdented
2016:1: E302 expected 2 blank lines, found 1
2016: D400 First line should end with '.', not '0'
2016: D205 Blank line missing between one-line summary and description
2036:26: E231 missing whitespace after ','
2075:1: E302 expected 2 blank lines, found 1
2075: D202 No blank lines allowed *after* function docstring, found 1
2075: D400 First line should end with '.', not 'e'
2075: D205 Blank line missing between one-line summary and description
2117:1: E302 expected 2 blank lines, found 1
2117: D401 First line should be imperative: 'Return', not 'Returns'
2117: D400 First line should end with '.', not 'e'
2117: D205 Blank line missing between one-line summary and description
2136:1: E302 expected 2 blank lines, found 1
2136: D400 First line should end with '.', not 'n'
2136: D205 Blank line missing between one-line summary and description
2153:1: E302 expected 2 blank lines, found 1
2153: D400 First line should end with '.', not ','
2153: D205 Blank line missing between one-line summary and description
2174:15: E271 multiple spaces after keyword
2177:1: E302 expected 2 blank lines, found 1
2177: D400 First line should end with '.', not 'n'
2177: D205 Blank line missing between one-line summary and description
2188:1: E302 expected 2 blank lines, found 1
2188: D400 First line should end with '.', not 'e'
2188: D205 Blank line missing between one-line summary and description
2204:1: E302 expected 2 blank lines, found 1
2204: D400 First line should end with '.', not 's'
2204: D205 Blank line missing between one-line summary and description
2216:1: E302 expected 2 blank lines, found 1
2216: D400 First line should end with '.', not 'e'
2216: D205 Blank line missing between one-line summary and description
2259:1: E302 expected 2 blank lines, found 1
2259: D400 First line should end with '.', not 'e'
2259: D200 One-line docstring should not occupy 3 lines
2271:1: E302 expected 2 blank lines, found 1
2271: D400 First line should end with '.', not 'e'
2285:1: E302 expected 2 blank lines, found 1
2320:114: E502 the backslash is redundant between brackets
2324:135: E502 the backslash is redundant between brackets
2327:125: E502 the backslash is redundant between brackets
2333:12: E127 continuation line over-indented for visual indent
2360:5: E303 too many blank lines (2)