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

Method _remove_comments

py/generate_bidi.py:1072–1083  ·  view source on GitHub ↗

Remove comments from CDDL content.

(self, content: str)

Source from the content-addressed store, hash-verified

1070 return self.modules
1071
1072 def _remove_comments(self, content: str) -> str:
1073 """Remove comments from CDDL content."""
1074 # CDDL uses ; for comments to end of line
1075 lines = content.split("\n")
1076 cleaned = []
1077 for line in lines:
1078 if ";" in line and not line.strip().startswith(";"):
1079 line = line[: line.index(";")]
1080 elif line.strip().startswith(";"):
1081 continue
1082 cleaned.append(line)
1083 return "\n".join(cleaned)
1084
1085 def _extract_definitions(self, content: str) -> None:
1086 """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