Skip to content

Commit

Permalink
Remove type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-piles committed Mar 15, 2024
1 parent a63d9b2 commit c01d683
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
### To run the dummy service:

make install_venv
make start

### Dummy service for
Expand Down
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async def prediction_data_post(prediction_data: PredictionData):
async def get_suggestions(tenant: str, extractor_id: str):
predictions_data = json.loads(data_path.read_text()) if exists(data_path) else list()

suggestions_list: list[dict[str, str]] = list()
suggestions_list = list()
options = json.loads(options_path.read_text()) if exists(options_path) else list()
for prediction_data in predictions_data:
suggestions_list.append(
Expand Down
8 changes: 5 additions & 3 deletions data/LabeledData.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import List

from pydantic import BaseModel

from data.Option import Option
Expand All @@ -10,11 +12,11 @@ class LabeledData(BaseModel):
xml_file_name: str
language_iso: str
label_text: str = ""
options: list[Option] = list()
options: List[Option] = list()
page_width: float
page_height: float
xml_segments_boxes: list[SegmentBox]
label_segments_boxes: list[SegmentBox]
xml_segments_boxes: List[SegmentBox]
label_segments_boxes: List[SegmentBox]

def correct_data_scale(self):
self.label_segments_boxes = [x.correct_input_data_scale() for x in self.label_segments_boxes]
Expand Down

0 comments on commit c01d683

Please sign in to comment.