MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / GetIndentLevel

Function GetIndentLevel

steps/cpplint.py:2261–2274  ·  view source on GitHub ↗

Return the number of leading spaces in line. Args: line: A string to check. Returns: An integer count of leading spaces, possibly zero.

(line)

Source from the content-addressed store, hash-verified

2259
2260
2261def GetIndentLevel(line):
2262 """Return the number of leading spaces in line.
2263
2264 Args:
2265 line: A string to check.
2266
2267 Returns:
2268 An integer count of leading spaces, possibly zero.
2269 """
2270 indent = Match(r'^( *)\S', line)
2271 if indent:
2272 return len(indent.group(1))
2273 else:
2274 return 0
2275
2276def PathSplitToList(path):
2277 """Returns the path split into a list by the separator.

Callers 2

__init__Method · 0.85
CheckBracesFunction · 0.85

Calls 1

MatchFunction · 0.85

Tested by

no test coverage detected