mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-02 12:22:39 +02:00
feat: +software company test pass
This commit is contained in:
parent
e5cabbe3cd
commit
cc3567a4a1
5 changed files with 15 additions and 9 deletions
|
|
@ -26,7 +26,7 @@ import sys
|
|||
import traceback
|
||||
from io import BytesIO
|
||||
from pathlib import Path
|
||||
from typing import Any, Callable, List, Literal, Tuple, Union
|
||||
from typing import Any, Callable, List, Literal, Optional, Tuple, Union
|
||||
from urllib.parse import quote, unquote
|
||||
|
||||
import aiofiles
|
||||
|
|
@ -271,7 +271,7 @@ class CodeParser:
|
|||
return block_dict
|
||||
|
||||
@classmethod
|
||||
def parse_code(cls, block: str, text: str, lang: str = "") -> str:
|
||||
def parse_code(cls, block: Optional[str], text: str, lang: str = "") -> str:
|
||||
if block:
|
||||
text = cls.parse_block(block, text)
|
||||
pattern = rf"```{lang}.*?\s+(.*?)```"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue