Back to the room

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

Code Observatory / function

detect_language

codeintel.languages.detect_language

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
_skip_reasonindexer.pythrough an import
parse_file__init__.pythrough an import
Inside (1)
SymbolFileResolved by
languageslanguages.pysame file
codeintel.languages.detect_languagebackend/app/codeintel/languages.py, lines 57–59Open source
def detect_language(path: str) -> LanguageSpec | None:    """Return the language for ``path`` or None if it is not source code we index."""    return _BY_EXTENSION.get(PurePosixPath(path).suffix.lower())

What the index recorded

Signature
def detect_language(path: str) -> LanguageSpec | None:
File
backend/app/codeintel/languages.py
Lines
57–59
Parser
python-ast
Git blob
9c3f2dca592f075d4edbcefa9bce88c245bc4886
Call sites
3 named, 0 resolved, 3 left unlinked
Outside this subset
5 more edges reach code outside the graph shown here

Read it on GitHub at this commit