Skip to content

[pre-commit.ci] pre-commit autoupdate#1

Open
pre-commit-ci[bot] wants to merge 2 commits intomainfrom
pre-commit-ci-update-config
Open

[pre-commit.ci] pre-commit autoupdate#1
pre-commit-ci[bot] wants to merge 2 commits intomainfrom
pre-commit-ci-update-config

Conversation

@pre-commit-ci
Copy link
Copy Markdown

@pre-commit-ci pre-commit-ci bot commented Aug 18, 2025

User description

updates:


CodeAnt-AI Description

Update pre-commit hooks to the newest upstream tool versions

What Changed

  • Formatting now runs through the Black mirror at 25.11 so pull requests enforce the latest formatting rules
  • Bandit 1.9.2 and detect-secrets 1.5.0 replace older releases to flag more current security issues before commits
  • All pre-commit-hooks entries now point to v6.0.0, keeping debugger/import checks, large-file limits, and symlink detection aligned with the latest logic

Impact

✅ Consistent Black 25.11 formatting checks
✅ Expanded Bandit and detect-secrets security coverage
✅ Current debug, large-file, and symlink gating in commits

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Aug 18, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@performance-testing-bot
Copy link
Copy Markdown

Unable to locate .performanceTestingBot config file

@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com bot commented Aug 18, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  storycraftr/agent/story/iterate.py  100% smaller
  .pre-commit-config.yaml  32% smaller

@octopaji
Copy link
Copy Markdown

octopaji bot commented Aug 18, 2025

🤝😁 Thankyou for your pull request!
tenorGif
> Via Tenor

Copy link
Copy Markdown

@llamapreview llamapreview bot left a comment

Choose a reason for hiding this comment

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

Auto Pull Request Review from LlamaPReview

Review Status: Automated Review Skipped

Dear contributor,

Thank you for your Pull Request. LlamaPReview has analyzed your changes and determined that this PR does not require an automated code review.

Analysis Result:

PR only contains version updates and formatting changes

Technical Context:

Version and formatting changes detected, which include:

  • Package version updates
  • Dependency version changes
  • Code formatting adjustments
  • Whitespace modifications
  • Structural formatting changes

We're continuously improving our PR analysis capabilities. Have thoughts on when and how LlamaPReview should perform automated reviews? Share your insights in our GitHub Discussions.

Best regards,
LlamaPReview Team

@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Aug 18, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

Comment on lines 190 to 194
prompt_text = (
INSERT_FLASHBACK_CHAPTER_PROMPT
if flashback
else INSERT_SPLIT_CHAPTER_PROMPT
if split
else INSERT_CHAPTER_PROMPT
else INSERT_SPLIT_CHAPTER_PROMPT if split else INSERT_CHAPTER_PROMPT
).format(prompt=prompt, position=position)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The use of nested ternary operators here reduces the readability and maintainability of the code. As the complexity of conditions grows, this approach can become error-prone and hard to manage. Consider refactoring this into a more readable format, such as using a simple if-elif-else block. This would not only enhance clarity but also ease future modifications.

Suggested Refactoring:

if flashback:
    prompt_text = INSERT_FLASHBACK_CHAPTER_PROMPT.format(prompt=prompt, position=position)
elif split:
    prompt_text = INSERT_SPLIT_CHAPTER_PROMPT.format(prompt=prompt, position=position)
else:
    prompt_text = INSERT_CHAPTER_PROMPT.format(prompt=prompt, position=position)

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from e14aac2 to b7a76ed Compare September 22, 2025 19:25
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Sep 22, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

1 similar comment
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Sep 22, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

Comment on lines 190 to 194
prompt_text = (
INSERT_FLASHBACK_CHAPTER_PROMPT
if flashback
else INSERT_SPLIT_CHAPTER_PROMPT
if split
else INSERT_CHAPTER_PROMPT
else INSERT_SPLIT_CHAPTER_PROMPT if split else INSERT_CHAPTER_PROMPT
).format(prompt=prompt, position=position)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The current implementation prioritizes flashback over split when both are true, which might not be explicitly intended and could lead to unexpected behavior. This logic should be clarified or adjusted to handle cases where both conditions might be true simultaneously to avoid potential bugs or misinterpretations.

Suggested Improvement:
Consider adding explicit handling or documentation to clarify the behavior when both flashback and split are true. This could involve adjusting the logic to handle this specific case or documenting the intended behavior clearly in the code.

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from a66ff6c to f6acc4c Compare October 6, 2025 19:52
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Oct 6, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

1 similar comment
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Oct 6, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from af6b7f3 to ed24912 Compare November 10, 2025 19:34
@codeant-ai
Copy link
Copy Markdown

codeant-ai bot commented Nov 10, 2025

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Nov 10, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@codeant-ai codeant-ai bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Nov 10, 2025
@codeant-ai
Copy link
Copy Markdown

codeant-ai bot commented Nov 10, 2025

CodeAnt AI finished reviewing your PR.

@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Nov 10, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from fac5c2e to 7e932e2 Compare November 17, 2025 19:15
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Nov 17, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@codeant-ai
Copy link
Copy Markdown

codeant-ai bot commented Nov 17, 2025

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai bot added size:XS This PR changes 0-9 lines, ignoring generated files and removed size:XS This PR changes 0-9 lines, ignoring generated files labels Nov 17, 2025
@codeant-ai
Copy link
Copy Markdown

codeant-ai bot commented Nov 17, 2025

CodeAnt AI Incremental review completed.

@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Nov 17, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from bed8a68 to d87ac4f Compare November 24, 2025 19:29
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Nov 24, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@codeant-ai codeant-ai bot added size:XS This PR changes 0-9 lines, ignoring generated files and removed size:XS This PR changes 0-9 lines, ignoring generated files labels Nov 24, 2025
@codeant-ai
Copy link
Copy Markdown

codeant-ai bot commented Nov 24, 2025

CodeAnt AI Incremental review completed.

@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Nov 24, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from eae65a5 to 7e3a2b0 Compare December 8, 2025 19:31
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Dec 8, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@codeant-ai
Copy link
Copy Markdown

codeant-ai bot commented Dec 8, 2025

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Dec 8, 2025

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from 493f97a to 82dba2a Compare January 19, 2026 19:32
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Jan 19, 2026

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@codeant-ai
Copy link
Copy Markdown

codeant-ai bot commented Jan 19, 2026

Skipping PR review because a bot author is detected.

If you want to trigger CodeAnt AI, comment @codeant-ai review to trigger a manual review.

@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Jan 19, 2026

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from eaaddb7 to f701d32 Compare March 2, 2026 19:42
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Mar 2, 2026

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

1 similar comment
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Mar 2, 2026

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from 69c7477 to aa4f84a Compare March 9, 2026 19:42
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Mar 9, 2026

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@codesyncapp
Copy link
Copy Markdown

codesyncapp bot commented Mar 9, 2026

Check out the playback for this Pull Request here.

@codesyncapp
Copy link
Copy Markdown

codesyncapp bot commented Mar 9, 2026

Check out the playback for this Pull Request here.

@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Mar 9, 2026

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@codesyncapp
Copy link
Copy Markdown

codesyncapp bot commented Mar 9, 2026

Check out the playback for this Pull Request here.

updates:
- https://github.com/psf/blackhttps://github.com/psf/black-pre-commit-mirror
- [github.com/psf/black-pre-commit-mirror: 23.9.1 → 26.3.1](psf/black-pre-commit-mirror@23.9.1...26.3.1)
- [github.com/PyCQA/bandit: 1.7.5 → 1.9.4](PyCQA/bandit@1.7.5...1.9.4)
- [github.com/Yelp/detect-secrets: v1.4.0 → v1.5.0](Yelp/detect-secrets@v1.4.0...v1.5.0)
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v6.0.0](pre-commit/pre-commit-hooks@v4.4.0...v6.0.0)
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v6.0.0](pre-commit/pre-commit-hooks@v4.4.0...v6.0.0)
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v6.0.0](pre-commit/pre-commit-hooks@v4.4.0...v6.0.0)
@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch from bfb72ae to beefc96 Compare March 16, 2026 19:32
@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Mar 16, 2026

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@codesyncapp
Copy link
Copy Markdown

codesyncapp bot commented Mar 16, 2026

Check out the playback for this Pull Request here.

1 similar comment
@codesyncapp
Copy link
Copy Markdown

codesyncapp bot commented Mar 16, 2026

Check out the playback for this Pull Request here.

@cr-gpt
Copy link
Copy Markdown

cr-gpt bot commented Mar 16, 2026

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@codesyncapp
Copy link
Copy Markdown

codesyncapp bot commented Mar 16, 2026

Check out the playback for this Pull Request here.

else INSERT_SPLIT_CHAPTER_PROMPT if split else INSERT_CHAPTER_PROMPT
).format(prompt=prompt, position=position)

# Generate new chapter content
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Lack of error handling for message creation

The call to create_message on line 197 is not wrapped in any error handling mechanism. If this function fails (e.g., due to network/API errors or invalid input), the chapter insertion process may be left incomplete, potentially resulting in inconsistent book state or missing chapters.

Recommended Solution:
Wrap the call in a try-except block and handle exceptions appropriately, such as logging the error, rolling back any partial changes, or notifying the user:

try:
    new_chapter_text = create_message(
        book_path,
        thread_id=thread.id,
        content=prompt_text,
        assistant=assistant,
        progress=progress,
        task_id=task_chapters,
    )
except Exception as e:
    console.print(f"[red]Failed to generate new chapter: {e}")
    # Optionally, rollback file renames or abort further processing
    return

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

Labels

ready for review size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants