Skip to content

Commit

Permalink
fix: lint (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhjz committed Sep 12, 2024
1 parent 4a399f8 commit 3359d3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/qianfan/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def get_config_with_kwargs(**kwargs: Any) -> Config:

assert isinstance(kwargs, dict)

upper_kwargs: Dict[str, any] = {}
upper_kwargs: Dict[str, Any] = {}
cfg_key = cfg.dict().keys()

for k, v in kwargs.items():
Expand Down
7 changes: 3 additions & 4 deletions python/qianfan/resources/llm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ async def _convert_v2_response_to_v1_async_stream(


class BaseResource(object):
_config: Optional[Config] = None

_runtime_models_info = {} # type: ignore
"""
动态模型列表
Expand All @@ -281,8 +279,8 @@ def __init__(
config: Optional[Config] = None,
**kwargs: Any,
) -> None:
self._config = config
if self._config is not None:
if config is not None:
self._config = config
return

if len(kwargs) != 0:
Expand All @@ -292,6 +290,7 @@ def __init__(

@property
def config(self) -> Config:
assert self._config is not None
return self._config

@classmethod
Expand Down

0 comments on commit 3359d3b

Please sign in to comment.