File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -60,18 +60,18 @@ def check_details_tag(file_list):
6060 if b'<details>' in line and after_detail :
6161 error = True
6262 if b'</details>' in line and not after_detail :
63- err_message = 'Missing opening detail tag'
63+ err_message = f 'Missing opening detail tag at line { line_number } '
6464 error = True
6565
6666 if b'<details>' in line :
6767 after_detail = True
6868
6969 if b'</details>' in line and after_detail :
70- err_message = 'Missing closing detail tag'
70+ err_message = f 'Missing closing detail tag at line { line_number } '
7171 after_detail = False
7272
7373 if error :
74- raise Exception (f' { err_message } at line { line_number - 1 } ' )
74+ raise Exception (err_message )
7575
7676
7777def check_summary_tag (file_list ):
@@ -95,18 +95,18 @@ def check_summary_tag(file_list):
9595 if b'<summary>' in line and after_detail :
9696 error = True
9797 if b'</summary>' in line and not after_detail :
98- err_message = 'Missing opening detail tag'
98+ err_message = f 'Missing opening summary tag at line { line_number } '
9999 error = True
100100
101101 if b'<summary>' in line :
102102 after_detail = True
103103
104104 if b'</summary>' in line and after_detail :
105- err_message = 'Missing closing detail tag'
105+ err_message = f 'Missing closing summary tag at line { line_number } '
106106 after_detail = False
107107
108108 if error :
109- raise Exception (f' { err_message } at line { line_number - 3 } ' )
109+ raise Exception (err_message )
110110
111111
112112if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments