From 1a2cadb5b5974b3883cec139e618a03c5e89a573 Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Mon, 24 Oct 2022 23:25:05 +0900 Subject: [PATCH] Fix for black==22.8.0 --- .github/workflows/ci.yml | 2 +- examples/instance_segmentation/labelme2coco.py | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eddcd4d12..48af88df5 100644 --- a/.github/workflows/ci.yml +++ b/.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 diff --git a/examples/instance_segmentation/labelme2coco.py b/examples/instance_segmentation/labelme2coco.py index ffa4cf99c..8c2beaaf2 100755 --- a/examples/instance_segmentation/labelme2coco.py +++ b/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")