MCPcopy Create free account
hub / github.com/deepnote/deepnote / count_lines_of_code

Function count_lines_of_code

packages/reactivity/src/scripts/ast-analyzer.py:235–242  ·  view source on GitHub ↗

Count lines of code in a block's content. Returns the total number of lines (including empty lines and comments).

(content)

Source from the content-addressed store, hash-verified

233
234
235def count_lines_of_code(content):
236 """
237 Count lines of code in a block's content.
238 Returns the total number of lines (including empty lines and comments).
239 """
240 if not content:
241 return 0
242 return len(content.split("\n"))
243
244
245def analyze_blocks(blocks):

Callers 1

analyze_blocksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected