MCPcopy
hub / github.com/aio-libs/aiohttp / calc_reason

Method calc_reason

aiohttp/protocol.py:837–843  ·  view source on GitHub ↗
(status, *, _RESPONSES=RESPONSES)

Source from the content-addressed store, hash-verified

835
836 @staticmethod
837 def calc_reason(status, *, _RESPONSES=RESPONSES):
838 record = _RESPONSES.get(status)
839 if record is not None:
840 reason = record[0]
841 else:
842 reason = str(status)
843 return reason
844
845 def __init__(self, transport, status,
846 http_version=HttpVersion11, close=False, reason=None):

Callers 2

__init__Method · 0.95
set_statusMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected