Skip to content

Commit b919446

Browse files
authored
Merge pull request #4796 from ocaisa/whitespace_exceptions
Also allow trailing whitespaces for `examples` and `citing` easyconfig parameters
2 parents 1365ab0 + f110518 commit b919446

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

easybuild/framework/easyconfig/style.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _eb_check_trailing_whitespace(physical_line, lines, line_number, checker_sta
100100

101101
# if the warning is about the multiline string of description
102102
# we will not issue a warning
103-
if checker_state.get('eb_last_key') == 'description':
103+
if checker_state.get('eb_last_key') in ['description', 'examples', 'citing']:
104104
result = None
105105

106106
return result

test/framework/style.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ def test_check_trailing_whitespace(self):
7777
'''description = """start of long description, ''', # trailing whitespace, but allowed in description
7878
''' continuation of long description ''', # trailing whitespace, but allowed in continued description
7979
''' end of long description"""''',
80+
'''citing = """start of long citing text, ''', # trailing whitespace, but allowed in citing
81+
''' continuation of long citing text ''', # trailing whitespace, but allowed in continued citing
82+
''' end of long citing text"""''',
83+
'''examples = """start of long examples, ''', # trailing whitespace, but allowed in examples
84+
''' continuation of long examples ''', # trailing whitespace, but allowed in continued examples
85+
''' end of long examples"""''',
8086
"moduleclass = 'tools' ", # trailing whitespace
8187
'',
8288
]
@@ -89,6 +95,12 @@ def test_check_trailing_whitespace(self):
8995
None,
9096
None,
9197
None,
98+
None,
99+
None,
100+
None,
101+
None,
102+
None,
103+
None,
92104
(21, "W299 trailing whitespace"),
93105
]
94106

0 commit comments

Comments
 (0)