diff --git a/codelimit/common/gsm/Pattern.py b/codelimit/common/gsm/Pattern.py index 2a9fb4e..d52f7bf 100644 --- a/codelimit/common/gsm/Pattern.py +++ b/codelimit/common/gsm/Pattern.py @@ -24,6 +24,7 @@ def consume(self, item) -> State | None: self.tokens.append(item) self.state = transition[1] return self.state + return None def is_accepting(self): return self.automata.is_accepting(self.state) diff --git a/codelimit/common/report/ReportReader.py b/codelimit/common/report/ReportReader.py index 54a3e3a..5547520 100644 --- a/codelimit/common/report/ReportReader.py +++ b/codelimit/common/report/ReportReader.py @@ -10,12 +10,12 @@ class ReportReader: @staticmethod - def get_report_version(json: str) -> str: + def get_report_version(json: str) -> Optional[str]: d = loads(json) return d["version"] if "version" in d else None @staticmethod - def from_json(json: str) -> Optional[Report]: + def from_json(json: str) -> Report: d = loads(json) codebase = Codebase(d["root"]) report = Report(codebase)