INNER CODE UNIT · Python
noFunctionKeywordFixer
asdf-vm/asdf · scripts/checkstyle.py:71
def noFunctionKeywordFixer(line: str, m: Any) -> str:
prestr, midstr, poststr = utilGetStrs(line, m)
midstr = midstr.strip()
midstr = midstr[len('function'):]
midstr = midstr.strip()
parenIdx = midstr.find('(')
if parenIdx != -1: midstr = midstr[:parenIdx]
return f'{prestr}{midstr}() {poststr}'
# Before: >/dev/null 2>&1
# After: &>/dev/null
# ---
# Before: 2>/dev/null 1>&2
# After: &>/dev/null
def noVerboseRedirectionFixer(line: str, m: Any) -> str: