Skip to content

Commit

Permalink
修改初始化参数的传递方式
Browse files Browse the repository at this point in the history
  • Loading branch information
911061873 committed Jun 26, 2022
1 parent 35750c6 commit 759e4a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ruishi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = (0, 1, 8)
version = (0, 1, 9)

__name__ = 'ruishi'
__version__ = '.'.join([str(i) for i in version])
Expand Down
3 changes: 2 additions & 1 deletion ruishi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def auth_flow(self, request):
request.headers['token'] = self.token
yield request

def __init__(self, user: data_models.UserCreate):
def __init__(self, username, password, uuid=None, token=None):
user = data_models.UserCreate(username=username, password=password, uuid=uuid, token=token)
self.client = httpx.Client(base_url=Ruishi.BASE_URL)
self.async_client = httpx.AsyncClient(base_url=Ruishi.BASE_URL)
self.username = user.username
Expand Down

0 comments on commit 759e4a6

Please sign in to comment.