Skip to content

Fix the ruff formatting issues#1788

Open
happyhuman wants to merge 6 commits intomainfrom
fix-ruff-issues
Open

Fix the ruff formatting issues#1788
happyhuman wants to merge 6 commits intomainfrom
fix-ruff-issues

Conversation

@happyhuman
Copy link
Copy Markdown
Collaborator

No description provided.

except Exception as e:
logger.error(f"Error in /enhance-image: {e}", exc_info=True)
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}")
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}") from e
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff-suggester] reported by reviewdog 🐶

Suggested change
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}") from e
raise HTTPException(
status_code=500, detail=f"Internal Server Error: {e}"
) from e

except Exception as e:
logger.error(f"Error in /edit-frame: {e}", exc_info=True)
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}")
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}") from e
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff-suggester] reported by reviewdog 🐶

Suggested change
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}") from e
raise HTTPException(
status_code=500, detail=f"Internal Server Error: {e}"
) from e

f"Error generating R2V video for index {index}: {e}", exc_info=True
)
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}")
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}") from e
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff-suggester] reported by reviewdog 🐶

Suggested change
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}") from e
raise HTTPException(
status_code=500, detail=f"Internal Server Error: {e}"
) from e

except Exception as e:
logger.error(f"Error in /generate-prompt: {e}", exc_info=True)
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}")
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}") from e
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff-suggester] reported by reviewdog 🐶

Suggested change
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}") from e
raise HTTPException(
status_code=500, detail=f"Internal Server Error: {e}"
) from e

except Exception as e:
logger.error(f"Error in /generate-custom-prompt: {e}", exc_info=True)
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}")
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}") from e
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff-suggester] reported by reviewdog 🐶

Suggested change
raise HTTPException(status_code=500, detail=f"Internal Server Error: {e}") from e
raise HTTPException(
status_code=500, detail=f"Internal Server Error: {e}"
) from e


def generate_footwear_description(
client, gemini_model: str = "gemini-2.5-flash", all_images_bytes: list[bytes] = None
client, gemini_model: str = "gemini-2.5-flash", all_images_bytes: list[bytes] | None = None
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff-suggester] reported by reviewdog 🐶

Suggested change
client, gemini_model: str = "gemini-2.5-flash", all_images_bytes: list[bytes] | None = None
client,
gemini_model: str = "gemini-2.5-flash",
all_images_bytes: list[bytes] | None = None,


def generate_veo_prompt_r2v(
client, gemini_model: str = "gemini-2.5-flash", all_images_bytes: list[bytes] = None
client, gemini_model: str = "gemini-2.5-flash", all_images_bytes: list[bytes] | None = None
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff-suggester] reported by reviewdog 🐶

Suggested change
client, gemini_model: str = "gemini-2.5-flash", all_images_bytes: list[bytes] | None = None
client,
gemini_model: str = "gemini-2.5-flash",
all_images_bytes: list[bytes] | None = None,

filtered = [
(idx, position)
for idx, position in zip(sampled_indices, product_position_frames)
for idx, position in zip(sampled_indices, product_position_frames, strict=False)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff-suggester] reported by reviewdog 🐶

Suggested change
for idx, position in zip(sampled_indices, product_position_frames, strict=False)
for idx, position in zip(
sampled_indices, product_position_frames, strict=False
)

)
except Exception as e:
raise HTTPException(status_code=500, detail=f"Failed to generate prompt: {e}")
raise HTTPException(status_code=500, detail=f"Failed to generate prompt: {e}") from e
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff-suggester] reported by reviewdog 🐶

Suggested change
raise HTTPException(status_code=500, detail=f"Failed to generate prompt: {e}") from e
raise HTTPException(
status_code=500, detail=f"Failed to generate prompt: {e}"
) from e

Comment on lines 142 to +144
with patch(
"mcp_server.shared.catalog.catalog_mcp.search", return_value=[]
) as mock_search:
):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ruff-suggester] reported by reviewdog 🐶

Suggested change
with patch(
"mcp_server.shared.catalog.catalog_mcp.search", return_value=[]
) as mock_search:
):
with patch("mcp_server.shared.catalog.catalog_mcp.search", return_value=[]):

@github-actions
Copy link
Copy Markdown

There is a problem with the Gemini CLI PR review. Please check the action logs for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant