mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 07:13:00 +00:00
Implement code review suggestions: add newline parameter and UnicodeDecodeError handling
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -28,7 +28,7 @@ def create_flow(name):
|
||||
(project_root / "tests").mkdir(exist_ok=True)
|
||||
|
||||
# Create .env file
|
||||
with open(project_root / ".env", "w", encoding="utf-8") as file:
|
||||
with open(project_root / ".env", "w", encoding="utf-8", newline="\n") as file:
|
||||
file.write("OPENAI_API_KEY=YOUR_API_KEY")
|
||||
|
||||
package_dir = Path(__file__).parent
|
||||
@@ -58,7 +58,7 @@ def create_flow(name):
|
||||
content = content.replace("{{flow_name}}", class_name)
|
||||
content = content.replace("{{folder_name}}", folder_name)
|
||||
|
||||
with open(dst_file, "w", encoding="utf-8") as file:
|
||||
with open(dst_file, "w", encoding="utf-8", newline="\n") as file:
|
||||
file.write(content)
|
||||
|
||||
# Copy and process root template files
|
||||
|
||||
Reference in New Issue
Block a user