(md, inst_var, class_key)
| 349 | |
| 350 | |
| 351 | def add_doc_inst_var(md, inst_var, class_key): |
| 352 | var_name = inst_var['var_name'] |
| 353 | var_key = join([class_key, var_name], '.') |
| 354 | var_type = '' |
| 355 | |
| 356 | # Instance variable type |
| 357 | if valid_dic_val(inst_var, 'type'): |
| 358 | var_type = ' ' + parentheses(italic(create_hyperlinks(inst_var['type']))) |
| 359 | |
| 360 | md.list_pushn( |
| 361 | html_key(var_key) + |
| 362 | bold(color(COLOR_INSTANCE_VAR, var_name)) + |
| 363 | var_type) |
| 364 | |
| 365 | # Instance variable doc |
| 366 | if valid_dic_val(inst_var, 'doc'): |
| 367 | md.textn(create_hyperlinks(md.prettify_doc(inst_var['doc']))) |
| 368 | |
| 369 | # Note doc |
| 370 | if valid_dic_val(inst_var, 'note'): |
| 371 | md.list_push(bold('Note:') + ' ') |
| 372 | md.textn(color(COLOR_NOTE, italic(create_hyperlinks(inst_var['note'])))) |
| 373 | md.list_pop() |
| 374 | |
| 375 | # Warning doc |
| 376 | if valid_dic_val(inst_var, 'warning'): |
| 377 | md.list_push(bold('Warning:') + ' ') |
| 378 | md.textn(color(COLOR_WARNING, italic(create_hyperlinks(inst_var['warning'])))) |
| 379 | md.list_pop() |
| 380 | |
| 381 | md.list_pop() |
| 382 | |
| 383 | |
| 384 | class Documentation: |
no test coverage detected