Skip to content

Commit 275b3ef

Browse files
fix(pre_commit): 🎨 auto format pre-commit hooks
1 parent f34ade0 commit 275b3ef

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

roboflow/util/folderparser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,7 @@ def _parseAnnotationCSV(filename):
353353
# for upload, but use csv.reader to correctly extract file_name (handles quoted commas).
354354
header_line = raw_lines[0] if raw_lines else ""
355355
lines = [
356-
{"file_name": row[0].strip() if row else "", "line": raw_line}
357-
for raw_line, row in zip(raw_lines[1:], rows[1:])
356+
{"file_name": row[0].strip() if row else "", "line": raw_line} for raw_line, row in zip(raw_lines[1:], rows[1:])
358357
]
359358
return {"headers": header_line, "lines": lines}
360359

tests/util/test_folderparser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,10 @@ def test_coco_root_annotation_matches_images_in_subdirs(self):
205205
self.assertEqual(len(ann_data["annotations"]), 1, "Should have one annotation")
206206
self.assertEqual(ann_data["annotations"][0]["bbox"], [10, 20, 100, 200])
207207

208-
209208
def test_parse_csv_quoted_filename(self):
210209
"""_parseAnnotationCSV must handle filenames containing commas (RFC 4180 quoting)."""
211210
with tempfile.NamedTemporaryFile(mode="w", suffix=".csv", delete=False, newline="") as f:
212-
f.write('img_fName,class_label\n')
211+
f.write("img_fName,class_label\n")
213212
f.write('"image,with,commas.jpg",cat\n')
214213
f.write("normal.jpg,dog\n")
215214
tmppath = f.name

0 commit comments

Comments
 (0)