MCPcopy
hub / github.com/nonebot/nonebot2 / set

Method set

nonebot/internal/driver/model.py:236–256  ·  view source on GitHub ↗
(self, name: str, value: str, domain: str = "", path: str = "/")

Source from the content-addressed store, hash-verified

234 raise TypeError(f"Cookies must be dict or list, not {type(cookies)}")
235
236 def set(self, name: str, value: str, domain: str = "", path: str = "/") -> None:
237 cookie = Cookie(
238 version=0,
239 name=name,
240 value=value,
241 port=None,
242 port_specified=False,
243 domain=domain,
244 domain_specified=bool(domain),
245 domain_initial_dot=domain.startswith("."),
246 path=path,
247 path_specified=bool(path),
248 secure=False,
249 expires=None,
250 discard=True,
251 comment=None,
252 comment_url=None,
253 rest={},
254 rfc2109=False,
255 )
256 self.jar.set_cookie(cookie)
257
258 def get( # pyright: ignore[reportIncompatibleMethodOverride]
259 self,

Callers 15

__init__Method · 0.95
__setitem__Method · 0.95
_print_messageMethod · 0.80
__call__Method · 0.80
exec_moduleMethod · 0.80
handle_exceptionMethod · 0.80
exitMethod · 0.80
set_resultMethod · 0.80
set_exceptionMethod · 0.80
ensure_contextMethod · 0.80
simple_runMethod · 0.80
background_taskFunction · 0.80

Calls

no outgoing calls

Tested by 4

background_taskFunction · 0.64
_handle_wsFunction · 0.64
calling_api_hook1Function · 0.64
called_api_hook1Function · 0.64