Skip to content

Commit

Permalink
Merge pull request #23 from Well2333/main
Browse files Browse the repository at this point in the history
🐛 修复无法正常判断 Auth 是否为空的错误
  • Loading branch information
djkcyl authored Aug 25, 2023
2 parents ea06d04 + 89443b2 commit aabf99f
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 aabf99f

Please sign in to comment.