MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / _docstring_text

Function _docstring_text

py/generate_bidi.py:77–86  ·  view source on GitHub ↗

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 = "")

Source from the content-addressed store, hash-verified

75
76
77def _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
89def _emit_docstring(text: str, indent_width: int) -> str:

Callers 3

to_python_dataclassMethod · 0.85
to_python_classMethod · 0.85
generate_codeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected