Skip to content

Commit fc04b36

Browse files
zhansheng.lzsclaude
andcommitted
Apply black formatting to error handling code
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 7721808 commit fc04b36

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

dashscope/finetune/agentic_rl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async def register_functions(
106106
)
107107
logger.info("Function components registered")
108108
except Exception as e:
109-
if hasattr(e, 'error_code'):
109+
if hasattr(e, "error_code"):
110110
raise
111111
raise RegistrationError(
112112
"Function registration failed",
@@ -251,7 +251,7 @@ def submit_job(
251251
**kwargs,
252252
)
253253
except Exception as e:
254-
if hasattr(e, 'error_code'):
254+
if hasattr(e, "error_code"):
255255
raise
256256
raise RuntimeErrorWithCode(
257257
"Job submission failed",
@@ -316,7 +316,7 @@ async def run(
316316
**kwargs,
317317
)
318318
except Exception as e:
319-
if hasattr(e, 'error_code'):
319+
if hasattr(e, "error_code"):
320320
raise
321321
raise RuntimeErrorWithCode(
322322
"RL tuning workflow failed",

dashscope/finetune/reinforcement/common/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ async def register_functions(
12451245
)
12461246

12471247
except Exception as e:
1248-
if hasattr(e, 'error_code'):
1248+
if hasattr(e, "error_code"):
12491249
raise
12501250
raise RegistrationError(
12511251
"Function component registration failed",

0 commit comments

Comments
 (0)