fix: resolve CI/CD issues and linting errors
Some checks failed
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled

This commit is contained in:
2026-02-06 01:26:33 +00:00
parent ac24bb48dd
commit f1b542f93c

View File

@@ -1,8 +1,6 @@
"""Test case generator for regex patterns."""
import random
import string
from typing import Optional, Callable
from typing import Optional
from .parser import parse_regex, RegexNode, NodeType
@@ -120,12 +118,13 @@ class TestCaseGenerator:
"""Generate strings that do NOT match the pattern."""
try:
ast = parse_regex(pattern, self.flavor)
return self._generate_non_matching_from_ast(ast, count, max_length)
return self._generate_non_matching_from_ast(pattern, ast, count, max_length)
except Exception:
return self._generate_fallback_non_matching(pattern, count)
def _generate_non_matching_from_ast(
self,
pattern: str,
node: RegexNode,
count: int,
max_length: int