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

Method _remove_comments

py/generate_bidi.py:1082–1093  ·  view source on GitHub ↗

Remove comments from CDDL content.

(self, content: str)

Source from the content-addressed store, hash-verified

1080 return self.modules
1081
1082 def _remove_comments(self, content: str) -> str:
1083 """Remove comments from CDDL content."""
1084 # CDDL uses ; for comments to end of line
1085 lines = content.split("\n")
1086 cleaned = []
1087 for line in lines:
1088 if ";" in line and not line.strip().startswith(";"):
1089 line = line[: line.index(";")]
1090 elif line.strip().startswith(";"):
1091 continue
1092 cleaned.append(line)
1093 return "\n".join(cleaned)
1094
1095 def _extract_definitions(self, content: str) -> None:
1096 """Extract CDDL definitions (type definitions, commands, etc.)."""

Callers 1

parseMethod · 0.95

Calls 2

splitMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected