Remove incorrect DTOs for JetBrains /runInspectionsOnFile call

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-07-13 22:39:03 +02:00
1 parent a3de03b556
commit 98966c6a59
2 files changed
+5 -18

No files matched your search

@@ -686,7 +686,7 @@ class JetBrainsPluginClient(ToStringMixin):
inspection_names: list[str] | None = None,
start_line: int | None = None,
end_line: int | None = None,
) -> jb.RunInspectionsResponse:
) -> dict:
"""
Runs IDE inspections on the given file and returns the results.
@@ -695,6 +695,9 @@ class JetBrainsPluginClient(ToStringMixin):
:param inspection_names: optional list of specific inspection names to run
:param start_line: optional start line to restrict the inspection range
:param end_line: optional end line to restrict the inspection range
:return: the inspection results as a dictionary.
NOTE: The response is currently *not* a well-defined DTO, because it stores variable data in keys.
Consequently, the `pythonify` option is disabled for this request, and the response is returned as-is.
"""
request_data: dict[str, Any] = {
"relativePath": relative_path,
@@ -707,7 +710,7 @@ class JetBrainsPluginClient(ToStringMixin):
request_data["startLine"] = start_line
if end_line is not None:
request_data["endLine"] = end_line
return cast(jb.RunInspectionsResponse, self._make_request("POST", "/runInspectionsOnFile", request_data, pythonify=False))
return self._make_request("POST", "/runInspectionsOnFile", request_data, pythonify=False)
def list_inspections(
self,
-16
View File
@@ -91,22 +91,6 @@ class TypeHierarchyResponse(TypedDict):
num_levels_not_included: NotRequired[int]
class InspectionResultDTO(TypedDict):
inspection_name: str
severity: str
message: str
relative_path: str
start_line: int
end_line: int
start_col: NotRequired[int]
end_col: NotRequired[int]
quick_fix_available: NotRequired[bool]
class RunInspectionsResponse(TypedDict):
inspections: list[InspectionResultDTO]
class InspectionInfoDTO(TypedDict):
name: str
group_path: str