mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-27 17:05:53 +00:00
Update
This commit is contained in:
parent
55f28c3611
commit
b7e1edbb25
1 changed files with 6 additions and 4 deletions
|
|
@ -94,8 +94,9 @@ def grade(working_directory: str) -> tuple[int, int]:
|
|||
for node in ast.walk(tree):
|
||||
if isinstance(node, ast.FunctionDef) and node.name == "__format__":
|
||||
for child in ast.walk(node):
|
||||
if isinstance(child, ast.Return
|
||||
) and isinstance(child.value, ast.Constant):
|
||||
if isinstance(child, ast.Return) and isinstance(
|
||||
child.value, ast.Constant
|
||||
):
|
||||
if child.value.value == "":
|
||||
completed += 1
|
||||
break
|
||||
|
|
@ -114,8 +115,9 @@ def grade(working_directory: str) -> tuple[int, int]:
|
|||
for node in ast.walk(tree):
|
||||
if isinstance(node, ast.ClassDef) and node.name == "_":
|
||||
has_class_underscore = True
|
||||
if isinstance(node,
|
||||
ast.Attribute) and isinstance(node.value, ast.Name):
|
||||
if isinstance(node, ast.Attribute) and isinstance(
|
||||
node.value, ast.Name
|
||||
):
|
||||
if node.value.id == "_" and node.attr == "_":
|
||||
has_attr_underscore = True
|
||||
if has_class_underscore and has_attr_underscore:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue