ty does not enforce existence of type signatures on functions, so use ruff to do it

This commit is contained in:
Kovid Goyal
2026-07-07 13:56:54 +05:30
parent cc95fccc8d
commit 8860f1a0a7
8 changed files with 78 additions and 69 deletions

View File

@@ -285,7 +285,7 @@ class CrashReportBase:
self._data = data
self._parse()
def _parse(self):
def _parse(self) -> None:
self._is_json = False
try:
modified_data = self._data
@@ -307,7 +307,7 @@ class CrashReportBase:
return self._metadata['bug_type']
@cached_property
def incident_id(self):
def incident_id(self) -> str:
return self._metadata.get('incident_id')
@cached_property
@@ -428,7 +428,7 @@ class UserModeCrashReport(CrashReportBase):
return result
@cached_property
def exception_type(self):
def exception_type(self) -> str:
if self._is_json:
return self._data['exception'].get('type')
else: