MCPcopy Index your code
hub / github.com/idank/explainshell / strip_trailing_blanks

Function strip_trailing_blanks

explainshell/extraction/postprocess.py:86–91  ·  view source on GitHub ↗

Remove trailing blank lines from description text.

(opt: Option)

Source from the content-addressed store, hash-verified

84
85
86def strip_trailing_blanks(opt: Option) -> Option:
87 """Remove trailing blank lines from description text."""
88 stripped = opt.text.rstrip("\n ")
89 if stripped == opt.text:
90 return opt
91 return opt.model_copy(update={"text": stripped})
92
93
94def _subset_has_cross_reference(subset: Option, extra_flags: frozenset[str]) -> bool:

Callers 1

postprocessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected