-
Notifications
You must be signed in to change notification settings - Fork 1
fix: resolve lint error blocking sync workflow #824
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -629,8 +629,10 @@ def analyze_issue(issue_body: str, *, use_llm: bool = True) -> IssueOptimization | |
| ) | ||
| return result | ||
| except Exception as openai_error: | ||
| err_type = type(openai_error).__name__ | ||
| print( | ||
| f"OpenAI API also failed ({type(openai_error).__name__}: {openai_error}), using fallback", | ||
| f"OpenAI API also failed " | ||
| f"({err_type}: {openai_error}), using fallback", | ||
| file=sys.stderr, | ||
| ) | ||
| else: | ||
|
|
@@ -819,8 +821,10 @@ def apply_suggestions( | |
| "used_llm": True, | ||
| } | ||
| except Exception as openai_error: | ||
| err_type = type(openai_error).__name__ | ||
|
||
| print( | ||
| f"OpenAI API also failed ({type(openai_error).__name__}: {openai_error}), using fallback", | ||
| f"OpenAI API also failed " | ||
| f"({err_type}: {openai_error}), using fallback", | ||
| file=sys.stderr, | ||
| ) | ||
| else: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, consider whether extracting
err_typehere is the best approach. Lines 646 and 838 have similar error handling patterns but usetype(e).__name__inline without extraction. Either all four locations should extract the error type into a variable, or all should use inline extraction. Alternatively, if line length is the only concern, the f-string could be split without introducing the intermediate variable.