mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-18 13:55:17 +02:00
feat: +init python folder
This commit is contained in:
parent
73430c7353
commit
53e593baa4
3 changed files with 29 additions and 2 deletions
|
|
@ -889,3 +889,11 @@ def get_project_srcs_path(workdir: str | Path) -> Path:
|
|||
else:
|
||||
src_name = Path(workdir).name
|
||||
return Path(workdir) / src_name
|
||||
|
||||
|
||||
async def init_python_folder(workdir: str | Path):
|
||||
init_filename = Path(workdir) / "__init__.py"
|
||||
if init_filename.exists():
|
||||
return
|
||||
async with aiofiles.open(init_filename, "a"):
|
||||
os.utime(init_filename, None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue