Select the appropriate raw docstring text (no triple-quotes). Priority: manifest custom string > CDDL description (if different from name) > 'ClassName.'
(custom: str | None, fallback_name: str, fallback_desc: str = "")
| 75 | |
| 76 | |
| 77 | def _docstring_text(custom: str | None, fallback_name: str, fallback_desc: str = "") -> str: |
| 78 | """Select the appropriate raw docstring text (no triple-quotes). |
| 79 | |
| 80 | Priority: manifest custom string > CDDL description (if different from name) > 'ClassName.' |
| 81 | """ |
| 82 | if custom: |
| 83 | return custom.strip() |
| 84 | if fallback_desc and fallback_desc != fallback_name: |
| 85 | return fallback_desc |
| 86 | return f"{fallback_name}." |
| 87 | |
| 88 | |
| 89 | def _emit_docstring(text: str, indent_width: int) -> str: |
no outgoing calls
no test coverage detected