Skip to content

Commit 6582e32

Browse files
fix(pre_commit): 🎨 auto format pre-commit hooks
1 parent 875addd commit 6582e32

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

tests/annotations/invalid_annotation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
"invalid annotation": true
66
}
77
]
8-
}
8+
}

tests/annotations/valid_annotation.json

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,19 @@
77
"url": "https://app.roboflow.ai/datasets/hard-hat-sample/1",
88
"date_created": "2000-01-01T00:00:00+00:00"
99
},
10-
"licenses": [{"id": 1, "url": "https://creativecommons.org/publicdomain/zero/1.0/", "name": "Public Domain"}],
10+
"licenses": [
11+
{
12+
"id": 1,
13+
"url": "https://creativecommons.org/publicdomain/zero/1.0/",
14+
"name": "Public Domain"
15+
}
16+
],
1117
"categories": [
12-
{"id": 0, "name": "cat", "supercategory": "animals"}
18+
{
19+
"id": 0,
20+
"name": "cat",
21+
"supercategory": "animals"
22+
}
1323
],
1424
"images": [
1525
{
@@ -26,7 +36,12 @@
2636
"id": 0,
2737
"image_id": 0,
2838
"category_id": 0,
29-
"bbox": [45, 2, 85, 85],
39+
"bbox": [
40+
45,
41+
2,
42+
85,
43+
85
44+
],
3045
"area": 7225,
3146
"segmentation": [],
3247
"iscrowd": 0
@@ -35,10 +50,15 @@
3550
"id": 1,
3651
"image_id": 0,
3752
"category_id": 0,
38-
"bbox": [324, 29, 72, 81],
53+
"bbox": [
54+
324,
55+
29,
56+
72,
57+
81
58+
],
3959
"area": 5832,
4060
"segmentation": [],
4161
"iscrowd": 0
4262
}
4363
]
44-
}
64+
}

tests/test_project.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from roboflow import API_URL
44
from roboflow.config import DEFAULT_BATCH_NAME
55
from roboflow.core.exceptions import UploadImageError
6-
from tests import RoboflowTest, PROJECT_NAME, ROBOFLOW_API_KEY
6+
from tests import PROJECT_NAME, ROBOFLOW_API_KEY, RoboflowTest
77

88

99
class TestProject(RoboflowTest):
@@ -51,7 +51,7 @@ def test_upload_image_that_already_is_annotated_raises_upload_image_error(self):
5151
"message": "Image was already annotated.",
5252
"type": "InvalidImageException",
5353
"hint": "This image was already annotated; to overwrite the annotation, pass overwrite=true...",
54-
},
54+
},
5555
status=200,
5656
)
5757

@@ -61,4 +61,4 @@ def test_upload_image_that_already_is_annotated_raises_upload_image_error(self):
6161
annotation_path="tests/annotations/valid_annotation.json",
6262
)
6363

64-
self.assertEquals(str(error.exception), "Error uploading image: Image was already annotated.")
64+
self.assertEqual(str(error.exception), "Error uploading image: Image was already annotated.")

0 commit comments

Comments
 (0)