Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/github/awesome-copilot
/ _line_count
Function
_line_count
skills/code-tour/scripts/validate_tour.py:41–46 ·
view source on GitHub ↗
(path: Path)
Source
from the content-addressed store, hash-verified
39
40
41
def
_line_count(path: Path) -> int:
42
try
:
43
with
open(path, errors=
"replace"
)
as
f:
44
return
sum(1
for
_ in f)
45
except
Exception:
46
return
0
47
48
49
def
_file_content(path: Path) -> str:
Callers
1
validate_tour
Function · 0.85
Calls
1
open
Function · 0.50
Tested by
no test coverage detected