Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

10.6 KB
Raw Blame
{
 "content": [
  {
   "type": "text",
   "text": "{\"result\":{\"targets\":{\"src/requests/models.py\":{\"type\":\"file\",\"path\":\"src/requests/models.py\",\"parent_page\":{\"title\":\"Application Requests\",\"target_path\":\"src/requests\",\"section\":\"4\"},\"docs\":{\"title\":\"File: src/requests/models.py\",\"summary\":\"requests.models ~~~~~~~~~~~~~~~\",\"symbols\":[{\"name\":\"REDIRECT_STATI\",\"kind\":\"constant\",\"signature\":\"REDIRECT_STATI: Final[tuple[int, ...]] = ( # type: ignore[assignment]\",\"line\":95,\"symbol_id\":\"src/requests/models.py::REDIRECT_STATI\"},{\"name\":\"DEFAULT_REDIRECT_LIMIT\",\"kind\":\"constant\",\"signature\":\"DEFAULT_REDIRECT_LIMIT: int = 30\",\"line\":103,\"symbol_id\":\"src/requests/models.py::DEFAULT_REDIRECT_LIMIT\"},{\"name\":\"CONTENT_CHUNK_SIZE\",\"kind\":\"constant\",\"signature\":\"CONTENT_CHUNK_SIZE: int = 10 * 1024\",\"line\":104,\"symbol_id\":\"src/requests/models.py::CONTENT_CHUNK_SIZE\"},{\"name\":\"ITER_CHUNK_SIZE\",\"kind\":\"constant\",\"signature\":\"ITER_CHUNK_SIZE: int = 512\",\"line\":105,\"symbol_id\":\"src/requests/models.py::ITER_CHUNK_SIZE\"},{\"name\":\"RequestEncodingMixin\",\"kind\":\"class\",\"signature\":\"class RequestEncodingMixin\",\"line\":108,\"symbol_id\":\"src/requests/models.py::RequestEncodingMixin\"},{\"name\":\"path_url\",\"kind\":\"method\",\"signature\":\"def path_url(self) -> str\",\"line\":112,\"symbol_id\":\"src/requests/models.py::RequestEncodingMixin::path_url\"},{\"name\":\"_encode_params\",\"kind\":\"method\",\"signature\":\"def _encode_params( data: _t.EncodableDataType, ) -> str | bytes | _t.SupportsRead[str | bytes]\",\"line\":151,\"symbol_id\":\"src/requests/models.py::RequestEncodingMixin::_encode_params\"},{\"name\":\"_encode_files\",\"kind\":\"method\",\"signature\":\"def _encode_files( files: _t.FilesType, data: _t.RawDataType | None ) -> tuple[bytes, str]\",\"line\":183,\"symbol_id\":\"src/requests/models.py::RequestEncodingMixin::_encode_files\"},{\"name\":\"RequestHooksMixin\",\"kind\":\"class\",\"signature\":\"class RequestHooksMixin\",\"line\":254,\"symbol_id\":\"src/requests/models.py::RequestHooksMixin\"},{\"name\":\"register_hook\",\"kind\":\"method\",\"signature\":\"def register_hook( self, event: str, hook: Iterable[_t.HookType] | _t.HookType ) -> None\",\"line\":257,\"symbol_id\":\"src/requests/models.py::RequestHooksMixin::register_hook\"},{\"name\":\"deregister_hook\",\"kind\":\"method\",\"signature\":\"def deregister_hook(self, event: str, hook: _t.HookType) -> bool\",\"line\":272,\"symbol_id\":\"src/requests/models.py::RequestHooksMixin::deregister_hook\"},{\"name\":\"Request\",\"kind\":\"class\",\"signature\":\"class Request\",\"line\":284,\"symbol_id\":\"src/requests/models.py::Request\"},{\"name\":\"__init__\",\"kind\":\"method\",\"signature\":\"def __init__( self, method: str | None = None, url: _t.UriType | None = None, headers: _t.HeadersType = None, files: _t.FilesType = None, data: _t.DataType = None, params: _t.ParamsType = None, auth: _t.AuthType = None, cookies: [REDACTED] | CookieJar | dict[str, str] | None = None, hooks: _t.HooksInputType | None = None, json: _t.JsonType = None, ) -> None\",\"line\":323,\"symbol_id\":\"src/requests/models.py::Request::__init__\"},{\"name\":\"__repr__\",\"kind\":\"method\",\"signature\":\"def __repr__(self) -> str\",\"line\":357,\"symbol_id\":\"src/requests/models.py::Request::__repr__\"},{\"name\":\"prepare\",\"kind\":\"method\",\"signature\":\"def prepare(self) -> PreparedRequest\",\"line\":360,\"symbol_id\":\"src/requests/models.py::Request::prepare\"},{\"name\":\"PreparedRequest\",\"kind\":\"class\",\"signature\":\"class PreparedRequest\",\"line\":378,\"symbol_id\":\"src/requests/models.py::PreparedRequest\"},{\"name\":\"__init__\",\"kind\":\"method\",\"signature\":\"def __init__(self) -> None\",\"line\":407,\"symbol_id\":\"src/requests/models.py::PreparedRequest::__init__\"},{\"name\":\"prepare\",\"kind\":\"method\",\"signature\":\"def prepare( self, method: str | None = None, url: _t.UriType | None = None, headers: Mapping[str, str | bytes] | None = None, files: _t.FilesType = None, data: _t.DataType = None, params: _t.ParamsType = None, auth: _t.AuthType = None, cookies: [REDACTED] | CookieJar | dict[str, str] | None = None, hooks: _t.HooksInputType | None = None, json: _t.JsonType = None, ) -> None\",\"line\":424,\"symbol_id\":\"src/requests/models.py::PreparedRequest::prepare\"},{\"name\":\"__repr__\",\"kind\":\"method\",\"signature\":\"def __repr__(self) -> str\",\"line\":453,\"symbol_id\":\"src/requests/models.py::PreparedRequest::__repr__\"},{\"name\":\"copy\",\"kind\":\"method\",\"signature\":\"def copy(self) -> PreparedRequest\",\"line\":456,\"symbol_id\":\"src/requests/models.py::PreparedRequest::copy\"},{\"name\":\"prepare_method\",\"kind\":\"method\",\"signature\":\"def prepare_method(self, method: str | None) -> None\",\"line\":467,\"symbol_id\":\"src/requests/models.py::PreparedRequest::prepare_method\"},{\"name\":\"_get_idna_encoded_host\",\"kind\":\"method\",\"signature\":\"def _get_idna_encoded_host(host: str) -> str\",\"line\":474,\"symbol_id\":\"src/requests/models.py::PreparedRequest::_get_idna_encoded_host\"},{\"name\":\"prepare_url\",\"kind\":\"method\",\"signature\":\"def prepare_url( self, url: _t.UriType, params: _t.ParamsType, ) -> None\",\"line\":483,\"symbol_id\":\"src/requests/models.py::PreparedRequest::prepare_url\"},{\"name\":\"prepare_headers\",\"kind\":\"method\",\"signature\":\"def prepare_headers(self, headers: Mapping[str, str | bytes] | None) -> None\",\"line\":565,\"symbol_id\":\"src/requests/models.py::PreparedRequest::prepare_headers\"},{\"name\":\"prepare_body\",\"kind\":\"method\",\"signature\":\"def prepare_body( self, data: _t.DataType, files: _t.FilesType, json: _t.JsonType = None ) -> None\",\"line\":576,\"symbol_id\":\"src/requests/models.py::PreparedRequest::prepare_body\"},{\"name\":\"prepare_content_length\",\"kind\":\"method\",\"signature\":\"def prepare_content_length(self, body: _t.BodyType) -> None\",\"line\":654,\"symbol_id\":\"src/requests/models.py::PreparedRequest::prepare_content_length\"},{\"name\":\"prepare_auth\",\"kind\":\"method\",\"signature\":\"def prepare_auth( self, auth: _t.AuthType, url: _t.UriType = \\\"\\\", ) -> None\",\"line\":670,\"symbol_id\":\"src/requests/models.py::PreparedRequest::prepare_auth\"},{\"name\":\"prepare_cookies\",\"kind\":\"method\",\"signature\":\"def prepare_cookies( self, cookies: [REDACTED] | CookieJar | dict[str, str] | None ) -> None\",\"line\":699,\"symbol_id\":\"src/requests/models.py::PreparedRequest::prepare_cookies\"},{\"name\":\"prepare_hooks\",\"kind\":\"method\",\"signature\":\"def prepare_hooks(self, hooks: _t.HooksInputType | None) -> None\",\"line\":722,\"symbol_id\":\"src/requests/models.py::PreparedRequest::prepare_hooks\"},{\"name\":\"Response\",\"kind\":\"class\",\"signature\":\"class Response\",\"line\":732,\"symbol_id\":\"src/requests/models.py::Response\"},{\"name\":\"__init__\",\"kind\":\"method\",\"signature\":\"def __init__(self) -> None\",\"line\":765,\"symbol_id\":\"src/requests/models.py::Response::__init__\"},{\"name\":\"__enter__\",\"kind\":\"method\",\"signature\":\"def __enter__(self) -> Self\",\"line\":812,\"symbol_id\":\"src/requests/models.py::Response::__enter__\"},{\"name\":\"__exit__\",\"kind\":\"method\",\"signature\":\"def __exit__(self, *args: Any) -> None\",\"line\":815,\"symbol_id\":\"src/requests/models.py::Response::__exit__\"},{\"name\":\"__getstate__\",\"kind\":\"method\",\"signature\":\"def __getstate__(self) -> dict[str, Any]\",\"line\":818,\"symbol_id\":\"src/requests/models.py::Response::__getstate__\"},{\"name\":\"__setstate__\",\"kind\":\"method\",\"signature\":\"def __setstate__(self, state: dict[str, Any]) -> None\",\"line\":826,\"symbol_id\":\"src/requests/models.py::Response::__setstate__\"},{\"name\":\"__repr__\",\"kind\":\"method\",\"signature\":\"def __repr__(self) -> str\",\"line\":834,\"symbol_id\":\"src/requests/models.py::Response::__repr__\"},{\"name\":\"__bool__\",\"kind\":\"method\",\"signature\":\"def __bool__(self) -> bool\",\"line\":837,\"symbol_id\":\"src/requests/models.py::Response::__bool__\"},{\"name\":\"__nonzero__\",\"kind\":\"method\",\"signature\":\"def __nonzero__(self) -> bool\",\"line\":847,\"symbol_id\":\"src/requests/models.py::Response::__nonzero__\"},{\"name\":\"__iter__\",\"kind\":\"method\",\"signature\":\"def __iter__(self) -> Iterator[bytes]\",\"line\":857,\"symbol_id\":\"src/requests/models.py::Response::__iter__\"},{\"name\":\"ok\",\"kind\":\"method\",\"signature\":\"def ok(self) -> bool\",\"line\":862,\"symbol_id\":\"src/requests/models.py::Response::ok\"}],\"symbols_truncated\":{\"shown\":40,\"total\":52,\"hint\":\"Call with compact=False or include=['full_doc'] for the full list.\"}},\"hotspot\":true,\"fix_history\":{\"fix_count\":3,\"last_fix_days_ago\":116},\"ownership\":{\"primary_owner\":\"Nate Prewitt\",\"owner_pct\":0.4444,\"owner_line_pct\":0.3936,\"contributor_count\":6,\"bus_factor\":3,\"recent_owner\":\"Joren Hammudoglu\",\"recent_owner_pct\":0.6},\"freshness\":{\"confidence_score\":1,\"freshness_status\":\"fresh\",\"is_stale\":false},\"architectural_layer\":{\"name\":\"Application\",\"description\":\"\",\"role\":\"edge_connector\"},\"callers\":[{\"file\":\"tests/test_requests.py\",\"imports\":true,\"inbound_calls\":25},{\"file\":\"src/requests/sessions.py\",\"imports\":true,\"inbound_calls\":2},{\"file\":\"src/requests/adapters.py\",\"imports\":true,\"inbound_calls\":1},{\"file\":\"src/requests/cookies.py\",\"imports\":true,\"inbound_calls\":1},{\"file\":\"src/requests/__init__.py\",\"imports\":true},{\"file\":\"src/requests/_types.py\",\"imports\":true},{\"file\":\"src/requests/api.py\",\"imports\":true},{\"file\":\"src/requests/auth.py\",\"imports\":true},{\"file\":\"src/requests/exceptions.py\",\"imports\":true},{\"file\":\"src/requests/hooks.py\",\"imports\":true},{\"file\":\"src/requests/utils.py\",\"imports\":true}],\"_call_graph_note\":\"File-level rollup: importing files plus inbound cross-file call counts. For symbol-precise callers pass 'file.py::Symbol'.\",\"episodes\":3}},\"_meta\":{\"contract_version\":2,\"timing_ms\":28.28,\"index_age_days\":49,\"indexed_commit\":\"4ed3d1b3204c\",\"live_head\":\"3bb56ba566ce\",\"index_behind\":true,\"index_scope\":{\"version\":1,\"projection\":\"compact\",\"run_mode\":\"standard\",\"content_provenance\":\"template\",\"git_tier\":\"full\",\"status\":\"unknown\",\"fingerprint\":\"118fda63ca3a\",\"full\":\"get_overview()\"},\"embedder\":\"mock\",\"embedder_degraded\":false,\"semantic_search\":false,\"scope_hint\":\"Unrelated to what was served: Config (19 files), Docs & Tooling (4).\",\"response_budget\":{\"limit_chars\":32000,\"tier\":\"expanded\",\"serialized_chars\":9804},\"completeness\":{\"capped\":false}}}}"
  }
 ],
 "isError": false
}