def parse_args(arguments=None, root=None, apply_config=False):
if arguments is None:<EOL><INDENT>arguments = []<EOL><DEDENT>parser = create_parser()<EOL>args = parser.parse_args(arguments)<EOL>if apply_config:<EOL><INDENT>parser = apply_config_defaults(parser, args, root=root)<EOL>args = parser.parse_args(arguments)<EOL><DEDENT>if args.max_line_length <= <NUM_LIT:0>:  <EOL><INDENT>parser.error('<STR_LIT>')<EOL><DEDENT>if args.select:<EOL><INDENT>args.select = _split_comma_separated(args.select)<EOL><DEDENT>if args.ignore:<EOL><INDENT>args.ignore = _split_comma_separated(args.ignore)<EOL><DEDENT>elif not args.select and args.aggressive:<EOL><INDENT>args.select = ['<STR_LIT:E>', '<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>args.ignore = _split_comma_separated(DEFAULT_IGNORE)<EOL><DEDENT>if args.exclude:<EOL><INDENT>args.exclude = _split_comma_separated(args.exclude)<EOL><DEDENT>else:<EOL><INDENT>args.exclude = []<EOL><DEDENT>return args<EOL>
Parse the arguments from the CLI.

    If apply_config then we first look up and apply configs using
    apply_config_defaults.