MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _is_python_file

Function _is_python_file

graphify/extract.py:6696–6704  ·  view source on GitHub ↗
(source_file: object)

Source from the content-addressed store, hash-verified

6694 return re.sub(r"[^a-zA-Z0-9]+", "", str(label)).lower()
6695
6696 def _is_python_file(source_file: object) -> bool:
6697 # The effective suffix honours a `.graphifyrc` language override. Only a
6698 # suffix another extractor owns is rejected: an extensionless file (a
6699 # shebang script), an unknown suffix, or a raw call that names no file
6700 # passes, as before the gate.
6701 suffix = effective_suffix(str(source_file or ""))
6702 if suffix.lower() in (".py", ".pyi"):
6703 return True
6704 return suffix not in _DISPATCH and suffix.lower() not in _DISPATCH
6705
6706 node_by_id: dict[str, dict] = {n.get("id"): n for n in all_nodes}
6707

Callers 2

_emit_callFunction · 0.85

Calls 1

effective_suffixFunction · 0.90

Tested by

no test coverage detected