MCPcopy
hub / github.com/neuml/paperai / linecount

Method linecount

test/python/utils.py:16–28  ·  view source on GitHub ↗

Counts the number of lines for file at path. Args: path: full path to file Returns: number of lines

(path)

Source from the content-addressed store, hash-verified

14
15 @staticmethod
16 def linecount(path):
17 """
18 Counts the number of lines for file at path.
19
20 Args:
21 path: full path to file
22
23 Returns:
24 number of lines
25 """
26
27 with open(path, "r", encoding="utf-8") as f:
28 return len(f.readlines())

Callers 6

testRunMethod · 0.80
testTokensMethod · 0.80
testRunMethod · 0.80
testReport1Method · 0.80
testReport2Method · 0.80
testReport3Method · 0.80

Calls

no outgoing calls

Tested by 6

testRunMethod · 0.64
testTokensMethod · 0.64
testRunMethod · 0.64
testReport1Method · 0.64
testReport2Method · 0.64
testReport3Method · 0.64