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 = "")
| 69 | |
| 70 | |
| 71 | def _docstring_text(custom: str | None, fallback_name: str, fallback_desc: str = "") -> str: |
| 72 | """Select the appropriate raw docstring text (no triple-quotes). |
| 73 | |
| 74 | Priority: manifest custom string > CDDL description (if different from name) > 'ClassName.' |
| 75 | """ |
| 76 | if custom: |
| 77 | return custom.strip() |
| 78 | if fallback_desc and fallback_desc != fallback_name: |
| 79 | return fallback_desc |
| 80 | return f"{fallback_name}." |
| 81 | |
| 82 | |
| 83 | def _emit_docstring(text: str, indent_width: int) -> str: |
no outgoing calls
no test coverage detected