INNER CODE UNIT · Python
pct
Cooler2/ApusGameEngine · tools/normalize_indent.py:56
pct = 100 * odd // total
if pct > 20:
return 'one'
elif pct < 10:
return 'two'
else:
return 'mixed'
# ---------------------------------------------------------------------------
# Transform
# ---------------------------------------------------------------------------
import re as _re
# Block-opening keywords (each matched begin/asm/try/case adds +1 to depth)
_BLOCK_OPEN_RE = _re.compile(r'\b(begin|try|case|asm)\b', _re.I)