Browse Source

Fix for black==22.8.0

Kentaro Wada 2 years ago
parent
commit
1a2cadb5b5
2 changed files with 13 additions and 3 deletions
  1. 1 1
      .github/workflows/ci.yml
  2. 12 2
      examples/instance_segmentation/labelme2coco.py

+ 1 - 1
.github/workflows/ci.yml

@@ -71,7 +71,7 @@ jobs:
       shell: bash -l {0}
       if: matrix.os != 'windows-latest'
       run: |
-        pip install black==22.3.0
+        pip install black==22.8.0
         black --line-length 79 --check --diff labelme/
 
     - name: Test with pytest

+ 12 - 2
examples/instance_segmentation/labelme2coco.py

@@ -54,7 +54,13 @@ def main():
             contributor=None,
             date_created=now.strftime("%Y-%m-%d %H:%M:%S.%f"),
         ),
-        licenses=[dict(url=None, id=0, name=None,)],
+        licenses=[
+            dict(
+                url=None,
+                id=0,
+                name=None,
+            )
+        ],
         images=[
             # license, url, file_name, height, width, date_captured, id
         ],
@@ -76,7 +82,11 @@ def main():
             continue
         class_name_to_id[class_name] = class_id
         data["categories"].append(
-            dict(supercategory=None, id=class_id, name=class_name,)
+            dict(
+                supercategory=None,
+                id=class_id,
+                name=class_name,
+            )
         )
 
     out_ann_file = osp.join(args.output_dir, "annotations.json")