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

Method __init__

python/python3/tornado/web.py:209–239  ·  view source on GitHub ↗
(
        self,
        application: "Application",
        request: httputil.HTTPServerRequest,
        **kwargs: Any
    )

Source from the content-addressed store, hash-verified

207 path_kwargs = None # type: Dict[str, str]
208
209 def __init__(
210 self,
211 application: "Application",
212 request: httputil.HTTPServerRequest,
213 **kwargs: Any
214 ) -> None:
215 super().__init__()
216
217 self.application = application
218 self.request = request
219 self._headers_written = False
220 self._finished = False
221 self._auto_finish = True
222 self._prepared_future = None
223 self.ui = ObjectDict(
224 (n, self._ui_method(m)) for n, m in application.ui_methods.items()
225 )
226 # UIModules are available as both `modules` and `_tt_modules` in the
227 # template namespace. Historically only `modules` was available
228 # but could be clobbered by user additions to the namespace.
229 # The template {% module %} directive looks in `_tt_modules` to avoid
230 # possible conflicts.
231 self.ui["_tt_modules"] = _UIModuleNamespace(self, application.ui_modules)
232 self.ui["modules"] = self.ui["_tt_modules"]
233 self.clear()
234 assert self.request.connection is not None
235 # TODO: need to add set_close_callback to HTTPConnection interface
236 self.request.connection.set_close_callback( # type: ignore
237 self.on_connection_close
238 )
239 self.initialize(**kwargs) # type: ignore
240
241 def _initialize(self) -> None:
242 pass

Callers

nothing calls this directly

Calls 8

_ui_methodMethod · 0.95
clearMethod · 0.95
ObjectDictClass · 0.90
_UIModuleNamespaceClass · 0.85
itemsMethod · 0.80
__init__Method · 0.45
set_close_callbackMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected