MCPcopy Create free account
hub / github.com/EasyIME/PIME / _get_arguments

Method _get_arguments

python/python3/tornado/web.py:544–557  ·  view source on GitHub ↗
(
        self, name: str, source: Dict[str, List[bytes]], strip: bool = True
    )

Source from the content-addressed store, hash-verified

542 return args[-1]
543
544 def _get_arguments(
545 self, name: str, source: Dict[str, List[bytes]], strip: bool = True
546 ) -> List[str]:
547 values = []
548 for v in source.get(name, []):
549 s = self.decode_argument(v, name=name)
550 if isinstance(s, unicode_type):
551 # Get rid of any weird control chars (unless decoding gave
552 # us bytes, in which case leave it alone)
553 s = RequestHandler._remove_control_chars_regex.sub(" ", s)
554 if strip:
555 s = s.strip()
556 values.append(s)
557 return values
558
559 def decode_argument(self, value: bytes, name: Optional[str] = None) -> str:
560 """Decodes an argument from the request.

Callers 4

get_argumentsMethod · 0.95
get_body_argumentsMethod · 0.95
get_query_argumentsMethod · 0.95
_get_argumentMethod · 0.95

Calls 3

decode_argumentMethod · 0.95
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected