Update django/aiservice/languages/java/testgen.py
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
This commit is contained in:
parent
3e769dd192
commit
b691c8fdda
1 changed files with 4 additions and 0 deletions
|
|
@ -308,11 +308,15 @@ def _validate_java_syntax(code: str) -> bool:
|
|||
if "class " not in code:
|
||||
return False
|
||||
|
||||
# Check for invalid import aliasing (Java doesn't support "import X as Y")
|
||||
# Check for invalid import aliasing (Java doesn't support "import X as Y")
|
||||
if re.search(r'import\s+[\w.]+\s+as\s+\w+', code):
|
||||
return False
|
||||
|
||||
return True
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def _has_test_functions(code: str) -> bool:
|
||||
|
|
|
|||
Loading…
Reference in a new issue