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

Function _docstring_text

py/generate_bidi.py:71–80  ·  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

69
70
71def _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
83def _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