Skip to content

Commit

Permalink
🐛 修复无法正常判断 Auth 是否为空的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Well2333 committed Aug 24, 2023
1 parent ea06d04 commit 89443b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bilireq/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
"protobuf>=4.23.4",
]
name = "bilireq"
version = "0.2.8"
version = "0.2.9"
description = ""
license = {text = "MIT"}

Expand Down

0 comments on commit 89443b2

Please sign in to comment.