Skip to content

Commit df75bf1

Browse files
MerricxStefanosChaliasos
authored andcommitted
Fix minor issues
1 parent bc5405d commit df75bf1

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/zkregex_fuzzer/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def fuzz_parser():
4949
parser.add_argument(
5050
"--save",
5151
choices=[status.name for status in HarnessStatus],
52-
nargs="*",
52+
nargs="+",
5353
help="Save reproducible files according to the specified Harness status",
5454
)
5555
parser.add_argument(
@@ -209,7 +209,7 @@ def main():
209209
subparser = parser.add_subparsers(dest="subcommand")
210210
subparser.add_parser(
211211
"fuzz",
212-
help="Generate fuzzed regexes using The Fuzzing Book's GrammarFuzzer.",
212+
help="Fuzz the target regex implementation.",
213213
parents=[fuzz_parser()]
214214
)
215215
subparser.add_parser(

src/zkregex_fuzzer/runner/base_runner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,17 @@ def match(self, input: str) -> tuple[bool, str]:
5050
"""
5151
pass
5252

53+
@abstractmethod
5354
def clean(self) -> None:
5455
"""
5556
Clean any produced temporary files.
5657
"""
5758
pass
5859

60+
@abstractmethod
5961
def save(self, path: str) -> str:
6062
"""
6163
Save any produced temporary files.
6264
"""
63-
return ""
65+
pass
6466

src/zkregex_fuzzer/runner/python.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,10 @@ def match(self, input: str) -> tuple[bool, str]:
3434
str_result = match_input[0] if match_success else ""
3535
return (match_success, str_result)
3636
except re.error as e:
37-
raise RegexRunError(f"Error matching regex: {e}")
37+
raise RegexRunError(f"Error matching regex: {e}")
38+
39+
def save(self, path: str) -> str:
40+
return super().save(path)
41+
42+
def clean(self) -> None:
43+
return super().clean()

0 commit comments

Comments
 (0)