Skip to content

Commit

Permalink
Fix to json loads
Browse files Browse the repository at this point in the history
  • Loading branch information
EvieePy committed Jul 31, 2024
1 parent e7b8fe0 commit 8ca82b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion views/htmx.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ async def htmx_save(self, request: starlette_plus.Request) -> starlette_plus.Res
)

if resp := validate_paste(data):
json_: dict[str, Any] = json.loads(resp.body)
json_: dict[str, Any] = json.loads(resp.body) # type: ignore; Can only be memoryview when specifically used.

Check failure on line 331 in views/htmx.py

View workflow job for this annotation

GitHub Actions / Type Coverage and Linting @ 3.x

Argument of type "bytes | memoryview[int]" cannot be assigned to parameter "s" of type "str | bytes | bytearray" in function "loads" (reportArgumentType)
return starlette_plus.HTMLResponse(
f"""<span id="errorResponse">{resp.status_code}: {json_["error"]}</span>""",
headers=error_headers,
Expand Down

0 comments on commit 8ca82b9

Please sign in to comment.