Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / function

_clean_comment

codeintel.parsers.treesitter_parser._clean_comment

PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.

PHAROS at 975a38dMIT license

Around this symbol

Search all symbols

Loading

Called by (2)
SymbolFileResolved by
_file_commenttreesitter_parser.pysame file
_leading_commenttreesitter_parser.pysame file
Inside (1)
SymbolFileResolved by
treesitter_parsertreesitter_parser.pysame file
codeintel.parsers.treesitter_parser._clean_commentbackend/app/codeintel/parsers/treesitter_parser.py, lines 336–347Open source
def _clean_comment(text: str) -> str:    lines = []    for raw in text.splitlines():        line = raw.strip()        for prefix in ("///", "//!", "//", "/**", "/*!", "/*", "*/", "*"):            if line.startswith(prefix):                line = line[len(prefix):]                break        line = line.removesuffix("*/").strip()        if line:            lines.append(line)    return " ".join(lines)

What the index recorded

Signature
def _clean_comment(text: str) -> str:
File
backend/app/codeintel/parsers/treesitter_parser.py
Lines
336–347
Parser
python-ast
Git blob
bf0c9a8044cadd3452ebf5ffa82b866ae00395a9
Call sites
7 named, 0 resolved, 7 left unlinked

Read it on GitHub at this commit