Skip to content

Commit 5a1f888

Browse files
style(logging): add spaces around equality checks in log statements
1 parent ff03cd6 commit 5a1f888

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎dashscope/finetune/reinforcement/common/model.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def to_yaml(self, file_path: str, overwrite: bool = True) -> None:
256256
logger.debug(
257257
f"The struct of Models class: "
258258
f""
259-
f"{model_dict if LOG_LEVEL=='DEBUG' else deep_mask(model_dict)}", # noqa: E501
259+
f"{model_dict if LOG_LEVEL == 'DEBUG' else deep_mask(model_dict)}", # noqa: E501
260260
)
261261

262262
with open(path, "w", encoding="utf-8") as f:
@@ -821,7 +821,7 @@ async def load(
821821
f"InstanceID: {self.instance_id}, "
822822
f"Endpoint: {self.instance_url}, "
823823
f"Response: "
824-
f"{result if LOG_LEVEL=='DEBUG' else deep_mask(result)}",
824+
f"{result if LOG_LEVEL == 'DEBUG' else deep_mask(result)}",
825825
)
826826

827827
except Exception as e:

‎dashscope/finetune/reinforcement/common/utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ def set_api_key(api_key: Optional[str] = None) -> None:
752752
os.environ["DASHSCOPE_API_KEY"] = api_key
753753
logger.debug(
754754
f"Set environ DASHSCOPE_API_KEY: "
755-
f"{api_key if LOG_LEVEL=='DEBUG' else deep_mask(api_key)}",
755+
f"{api_key if LOG_LEVEL == 'DEBUG' else deep_mask(api_key)}",
756756
)
757757
return
758758

0 commit comments

Comments
 (0)