MCPcopy Create free account
hub / github.com/917Dhj/DeepPaperNote / _find_unbalanced_braces

Function _find_unbalanced_braces

scripts/lint_note.py:1105–1114  ·  view source on GitHub ↗
(expr: str)

Source from the content-addressed store, hash-verified

1103
1104
1105def _find_unbalanced_braces(expr: str) -> bool:
1106 depth = 0
1107 for char in expr:
1108 if char == "{":
1109 depth += 1
1110 elif char == "}":
1111 depth -= 1
1112 if depth < 0:
1113 return True
1114 return depth != 0
1115
1116
1117def _parse_group_argument(expr: str, start: int) -> int | None:

Callers 1

math_render_issuesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected