Skip to content

fix: Fix load_oauth & Bump version to 0.10.2 #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions cozepy/auth/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import abc
import json
import time
from typing import List, Optional, Union
from urllib.parse import quote_plus, urlparse
Expand Down Expand Up @@ -661,8 +660,7 @@ async def refresh_access_token(self, refresh_token: str) -> OAuthToken:
return await self._arefresh_access_token(refresh_token)


def load_oauth_app_from_config(conf: str) -> Union[PKCEOAuthApp, JWTOAuthApp, DeviceOAuthApp, WebOAuthApp]:
config = json.loads(conf)
def load_oauth_app_from_config(config: dict) -> Union[PKCEOAuthApp, JWTOAuthApp, DeviceOAuthApp, WebOAuthApp]:
client_id = config.get("client_id", "")
client_type = config.get("client_type", "")
coze_api_base = config.get("coze_api_base", "")
Expand Down
2 changes: 1 addition & 1 deletion cozepy/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
from functools import lru_cache

VERSION = "0.10.1"
VERSION = "0.10.2"


def get_os_version() -> str:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cozepy"
version = "0.10.1"
version = "0.10.2"
description = "OpenAPI SDK for Coze(coze.com/coze.cn)"
authors = ["chyroc <chyroc@bytedance.com>"]
readme = "README.md"
Expand Down
Loading