Skip to content

Add verify=False flag to create_file method#813

Draft
codegen-sh[bot] wants to merge 2 commits intodevelopfrom
gen/3d5a8d9a-5874-49cc-a15d-d760cb612c89
Draft

Add verify=False flag to create_file method#813
codegen-sh[bot] wants to merge 2 commits intodevelopfrom
gen/3d5a8d9a-5874-49cc-a15d-d760cb612c89

Conversation

@codegen-sh
Copy link
Contributor

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

This PR adds a verify=False flag to the create_file method in codebase.py. When verify=False is passed, files will be created even if they contain syntax errors.

Changes:

  • Added a new verify parameter (defaults to True) to the create_file method
  • Passes this parameter to the underlying from_content method as verify_syntax
  • Only raises an error when verification is enabled and parsing fails
  • When verification is disabled and parsing fails, creates the file as a regular file
  • Updated the documentation to reflect the new parameter

This addresses the request to allow creating files without validating their syntax.

@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