Creates a section tuple for the values section of the usage details.
(component, values)
| 595 | |
| 596 | |
| 597 | def _ValuesUsageDetailsSection(component, values): |
| 598 | """Creates a section tuple for the values section of the usage details.""" |
| 599 | value_item_strings = [] |
| 600 | for value_name, value in values.GetItems(): |
| 601 | del value |
| 602 | init_info = inspectutils.Info(component.__class__.__init__) |
| 603 | value_item = None |
| 604 | if 'docstring_info' in init_info: |
| 605 | init_docstring_info = init_info['docstring_info'] |
| 606 | if init_docstring_info.args: |
| 607 | for arg_info in init_docstring_info.args: |
| 608 | if arg_info.name == value_name: |
| 609 | value_item = _CreateItem(value_name, arg_info.description) |
| 610 | if value_item is None: |
| 611 | value_item = str(value_name) |
| 612 | value_item_strings.append(value_item) |
| 613 | return ('VALUES', _NewChoicesSection('VALUE', value_item_strings)) |
| 614 | |
| 615 | |
| 616 | def _NewChoicesSection(name, choices): |
no test coverage detected