@@ -482,31 +482,30 @@ def global_to_node(meta, src):
482482 if meta .get (settings , {}):
483483 ret += [f'{ INDENT } .. cylc:conf:: { settings } ' , '' ]
484484 for regex , info in reversed (meta [settings ].items ()):
485- task_meta = info .get ('meta' , {})
486- title = task_meta .get ('title' , '' )
485+ platform_meta = info .get ('meta' , {})
486+ title = platform_meta .get ('title' , '' )
487487 if not title :
488488 title = regex
489489 ret += [
490490 f'{ INDENT * 3 } .. cylc:conf:: { title } ' , '' ,
491- f'{ INDENT * 4 } .. admonition :: Key Details' , '' ]
491+ f'{ INDENT * 4 } .. csv-table :: Key Details' , '' ]
492492
493493 if title != regex :
494- ret += [
495- f'{ INDENT * 5 } Match ``{ regex } `` to select these { settings } .' ,
496- '' ]
494+ ret .append (f'{ INDENT * 5 } Regex, ``{ regex } ``.' )
497495
498496 if info .get ('job_runner' ):
499- ret += [
500- f'{ INDENT * 5 } This platform uses job runner'
501- f' ``{ info .get ("job_runner" )} ``' , '' ]
502-
503- ret += [ f' { INDENT * 5 } Selects { selects } from:' , '' ]
504-
505- for selectable in info [ 'select_from' ]:
506- ret += [ f' { INDENT * 5 } * `` { selectable } ``' , '' ]
507-
497+ ret . append (
498+ f'{ INDENT * 5 } job runner, '
499+ f' ``{ info .get ("job_runner" )} ``' )
500+
501+ selectables = '- ' + ' \n - ' . join (
502+ f'`` { i } ``' for i in info [ "select_from" ])
503+ ret . append ( f' { INDENT * 5 } { selects } ," { selectables } "' )
504+ ret . append ( '' )
505+ desc = platform_meta . get ( "description" , "No description" )
508506 ret += [
509- f'{ INDENT * 4 } { task_meta .get ("description" , "No description" )} ' ,
507+ f'{ INDENT * 4 } '
508+ f'{ desc } ' ,
510509 '' ]
511510
512511 [print (i ) for i in ret ]
0 commit comments