Skip to content

Commit

Permalink
Fix ruff formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
clinton-encord committed Jan 7, 2025
1 parent df37f4c commit f14e19b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 2 additions & 6 deletions encord/objects/ontology_labels_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2417,9 +2417,7 @@ def _add_classification_instances_from_classifications_without_frames(
classification_answers: dict,
):
for classification_answer in classification_answers.values():
classification_instance = self._create_new_classification_instance_with_ranges(
classification_answer
)
classification_instance = self._create_new_classification_instance_with_ranges(classification_answer)
self.add_classification_instance(classification_instance)

def _parse_image_group_frame_level_data(self, label_row_data_units: dict) -> Dict[int, FrameLevelImageGroupData]:
Expand Down Expand Up @@ -2476,9 +2474,7 @@ def _create_new_classification_instance(
return None

# This is only to be used by non-frame modalities (e.g. Audio)
def _create_new_classification_instance_with_ranges(
self, classification_answer: dict
) -> ClassificationInstance:
def _create_new_classification_instance_with_ranges(self, classification_answer: dict) -> ClassificationInstance:
feature_hash = classification_answer["featureHash"]
classification_hash = classification_answer["classificationHash"]

Expand Down
3 changes: 2 additions & 1 deletion tests/objects/data/plain_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"shape": "text",
},
},
"classification_answers": { "textClassificationHash": {
"classification_answers": {
"textClassificationHash": {
"classificationHash": "textClassificationHash",
"featureHash": "jPOcEsbw",
"classifications": [
Expand Down

0 comments on commit f14e19b

Please sign in to comment.