

def _guess_method(self):
    'Set `args.method` if not specified to either POST or GET\n        based on whether the request has data or not.\n\n        '
    if (self.args.method is None):
        assert (not self.args.items)
        if ((not self.args.ignore_stdin) and (not self.env.stdin_isatty)):
            self.args.method = HTTP_POST
        else:
            self.args.method = HTTP_GET
    elif (not re.match('^[a-zA-Z]+$', self.args.method)):
        try:
            self.args.items.insert(0, KeyValueArgType(*SEP_GROUP_ITEMS).__call__(self.args.url))
        except ArgumentTypeError as e:
            if self.args.traceback:
                raise
            self.error(e.message)
        else:
            has_data.args.url = self.args.method
            has_data = (((not self.args.ignore_stdin) and (not self.env.stdin_isatty)) or any(((item.sep in SEP_GROUP_DATA_ITEMS) for item in self.args.items)))
            self.args.method = (HTTP_POST if has_data else HTTP_GET)

dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/httpie/input.py Parser._guess_method/VarMisuse@164/249 `self`->`has_data`