Skip to content
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: 2 additions & 2 deletions ucloud/core/client/_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class ConfigSchema(schema.Schema):
fields = {
"region": fields.Str(required=True),
"region": fields.Str(),
"project_id": fields.Str(),
"base_url": fields.Str(default="https://api.ucloud.cn"),
"user_agent": fields.Str(),
Expand Down Expand Up @@ -46,7 +46,7 @@ class Config:

def __init__(
self,
region: str,
region: str = None,
project_id: str = None,
base_url: str = "https://api.ucloud.cn",
user_agent: str = None,
Expand Down
2 changes: 1 addition & 1 deletion ucloud/core/client/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ def _build_user_agent(self) -> str:
return user_agent

def __repr__(self):
return '<{}("{}")>'.format(self.__class__.__name__, self.config.region)
return '<{}(region="{}")>'.format(self.__class__.__name__, self.config.region)
Loading