Skip to content

Commit

Permalink
fix: Correct ssue with not displaying a list correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
NexSabre committed May 17, 2022
1 parent 6e6cd8c commit d4deaa6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ format-ui:

format:
@echo "Formatting..."
python3 -m isort ph/ tests/ --profile black
python3 -m black -t py38 ph/ tests/
prettier --write src/
@echo "Formatting... Done"
Expand Down
4 changes: 2 additions & 2 deletions ph/models/decoded_hex.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Literal
from typing import Any, Dict, List, Literal

from pydantic import BaseModel

Expand All @@ -12,4 +12,4 @@ class HexSummary(BaseModel):
class DecodedHex(BaseModel):
hex: str
summary: HexSummary
structure: Dict[str, Any]
structure: List[Dict[str, Any]]
2 changes: 1 addition & 1 deletion ph/routers/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def prepare_api_response(hex_string):
"length_unit": "B",
"hexdump": hexdump(h, dump=True),
},
structure=prepare_api_response(hex_string)[0],
structure=prepare_api_response(hex_string),
)
except IndexError:
raise HTTPException(
Expand Down

0 comments on commit d4deaa6

Please sign in to comment.