MCPcopy Index your code
hub / github.com/tirth8205/code-review-graph / _is_entry_point

Function _is_entry_point

code_review_graph/refactor.py:185–197  ·  view source on GitHub ↗

Check if a node looks like an entry point by name or decorator. Unlike ``flows.detect_entry_points()`` which treats ALL uncalled functions as entry points, this checks only for conventional name patterns and framework decorators -- the indicators that a function is *intentionally* a

(node: Any)

Source from the content-addressed store, hash-verified

183
184
185def _is_entry_point(node: Any) -> bool:
186 """Check if a node looks like an entry point by name or decorator.
187
188 Unlike ``flows.detect_entry_points()`` which treats ALL uncalled functions
189 as entry points, this checks only for conventional name patterns and
190 framework decorators -- the indicators that a function is *intentionally*
191 an entry point rather than simply unreferenced dead code.
192 """
193 if _has_framework_decorator(node):
194 return True
195 if _matches_entry_name(node):
196 return True
197 return False
198
199
200# Matches identifiers inside type annotations (e.g. "GoalCreate" in

Callers 1

find_dead_codeFunction · 0.85

Calls 2

_has_framework_decoratorFunction · 0.85
_matches_entry_nameFunction · 0.85

Tested by

no test coverage detected