MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _strip_eol_comment

Function _strip_eol_comment

scripts/code-verify.py:595–598  ·  view source on GitHub ↗

Return `line` without any trailing `//` line comment, ignoring `//` that lives inside a string literal.

(line: str)

Source from the content-addressed store, hash-verified

593
594
595def _strip_eol_comment(line: str) -> str:
596 """Return `line` without any trailing `//` line comment, ignoring `//`
597 that lives inside a string literal."""
598 return _strip_strings_and_comments(line).rstrip()
599
600
601def _is_brace_free_control(line: str) -> bool:

Calls 1

Tested by

no test coverage detected