WebhookServer
41 import json # type: ignore[no-redef]
42
43
44class WebhookServer: 45 def __init__(
46 self, listen: str, port: int, webhook_app: 'WebhookAppClass', ssl_ctx: SSLContext
47 ):
WebhookAppClass
85 )
86
87
88class WebhookAppClass(tornado.web.Application): 89 def __init__(self, webhook_path: str, bot: 'Bot', update_queue: Queue):
90 self.shared_objects = {"bot": bot, "update_queue": update_queue}
91 handlers = [(rf"{webhook_path}/?", WebhookHandler, self.shared_objects)] # noqa
WebhookHandler
97
98# WebhookHandler, process webhook calls
99# pylint: disable=W0223
100class WebhookHandler(tornado.web.RequestHandler):101 SUPPORTED_METHODS = ["POST"] # type: ignore
102
103 def __init__(
Class docstring is missing.
If you want to ignore this, you can configure this in the .deepsource.toml
file. Please refer to docs for available options.