From 89443b27f268d5f9e0b08a6dca8bbd34c24c01c6 Mon Sep 17 00:00:00 2001 From: Well404 Date: Thu, 24 Aug 2023 23:31:11 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E5=88=A4=E6=96=AD=20Auth=20=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bilireq/auth/__init__.py | 3 +++ pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bilireq/auth/__init__.py b/bilireq/auth/__init__.py index 6378caf..525b771 100644 --- a/bilireq/auth/__init__.py +++ b/bilireq/auth/__init__.py @@ -12,6 +12,9 @@ def __init__(self, auth: T_Auth = None): self.update(auth) # self.update(kwargs) + def __bool__(self): + return bool(self.tokens) and bool(self.cookies) + @property def uid(self): return self["uid"] diff --git a/pyproject.toml b/pyproject.toml index 868a94f..c655184 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ dependencies = [ "protobuf>=4.23.4", ] name = "bilireq" -version = "0.2.8" +version = "0.2.9" description = "" license = {text = "MIT"}