Skip to content

Add verify=False flag to codebase.create_file#811

Draft
codegen-sh[bot] wants to merge 2 commits intodevelopfrom
gen/22597b62-91cd-4a7a-878b-d2ff52206188
Draft

Add verify=False flag to codebase.create_file#811
codegen-sh[bot] wants to merge 2 commits intodevelopfrom
gen/22597b62-91cd-4a7a-878b-d2ff52206188

Conversation

@codegen-sh
Copy link
Contributor

@codegen-sh codegen-sh bot commented Mar 12, 2025

This PR adds a verify=False flag to the codebase.create_file method that allows bypassing syntax validation when creating files.

Changes

  • Added a new verify parameter (defaults to True) to the create_file method
  • Modified the method to pass the verify_syntax parameter to the underlying from_content method
  • Updated the error handling to only raise an error when verification is enabled
  • Updated the method documentation to reflect the new parameter

Testing

The implementation leverages the existing verify_syntax parameter in the from_content method, which was already implemented but not exposed through the create_file method.

When verify=False is passed, the file will be created even if it contains syntax errors, which is useful for creating files with partial or invalid content during development or testing.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


codegen-bot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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