blob: 5852dc9f3f21b57d9b61e211600aecfa5c68ba91 [file] [log] [blame]
from . import CWrapPlugin
class ArgcountChecker(CWrapPlugin):
def process_all_checks(self, checks, option):
if not checks:
checks = '__argcount == 0'
else:
indent = '\n '
argcount = option['num_checked_args'] + option.get('argcount_offset', 0)
checks = '__argcount == {} &&'.format(str(argcount)) + indent + checks
return checks