MCPcopy Create free account
hub / github.com/psf/cachecontrol / _update_chunk_length

Method _update_chunk_length

cachecontrol/adapter.py:137–146  ·  view source on GitHub ↗
(
                        weak_self: weakref.ReferenceType[HTTPResponse],
                    )

Source from the content-addressed store, hash-verified

135 super_update_chunk_length = response.__class__._update_chunk_length
136
137 def _update_chunk_length(
138 weak_self: weakref.ReferenceType[HTTPResponse],
139 ) -> None:
140 self = weak_self()
141 if self is None:
142 return
143
144 super_update_chunk_length(self)
145 if self.chunk_left == 0:
146 self._fp._close() # type: ignore[union-attr]
147
148 response._update_chunk_length = functools.partial( # type: ignore[method-assign]
149 _update_chunk_length, weakref.ref(response)

Callers

nothing calls this directly

Calls 1

_closeMethod · 0.80

Tested by

no test coverage detected