File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
code_annotations/contrib/sphinx/extensions Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -132,22 +132,23 @@ def iter_nodes(self):
132132 ids = [f"definition-{ event_name } " ],
133133 )
134134
135- event_section += nodes .paragraph (text = "Triggers" , ids = [f"triggers-{ event_name } " ])
136- triggers_bullet_list = nodes .bullet_list ()
137- for repository , path in zip (event_trigger_repository , event_trigger_path ):
138- triggers_bullet_list += nodes .list_item (
139- "" ,
140- nodes .paragraph (
135+ if event_trigger_path and event_trigger_repository :
136+ event_section += nodes .paragraph (text = "Triggers" , ids = [f"triggers-{ event_name } " ])
137+ triggers_bullet_list = nodes .bullet_list ()
138+ for repository , path in zip (event_trigger_repository , event_trigger_path ):
139+ triggers_bullet_list += nodes .list_item (
141140 "" ,
142- "Path: " ,
143- nodes .reference (
144- text = path ,
145- refuri = f"https://github.com/search?q=repo:{ repository } +{ event_name } +path:{ path } "
141+ nodes .paragraph (
142+ "" ,
143+ "Path: " ,
144+ nodes .reference (
145+ text = path ,
146+ refuri = f"https://github.com/search?q=repo:{ repository } +{ event_name } +path:{ path } "
147+ ),
146148 ),
147- ),
148- )
149+ )
149150
150- event_section += triggers_bullet_list
151+ event_section += triggers_bullet_list
151152
152153 if event .get (".. event_warning:" ) not in (None , "None" , "n/a" , "N/A" ):
153154 event_section += nodes .warning (
You can’t perform that action at this time.
0 commit comments