From 53e8cf68bd679a808d4bedddfcef3db5d01db840 Mon Sep 17 00:00:00 2001 From: yo-tak Date: Fri, 26 Jun 2026 14:59:26 +0900 Subject: [PATCH 1/2] =?UTF-8?q?chore(deps):=20black=20=E3=82=92=2026.5.1?= =?UTF-8?q?=20=E3=81=AB=E6=9B=B4=E6=96=B0=E3=81=97=E3=81=A6=20Dependabot?= =?UTF-8?q?=20=E3=82=A2=E3=83=A9=E3=83=BC=E3=83=88=E3=82=92=E8=A7=A3?= =?UTF-8?q?=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit black<24.3.0 の ReDoS 脆弱性 (GHSA-fj7x-q9j7-g6q6) に対応。 バージョンがズレると black --check が CI で落ちるため、ハードコードされて いた3箇所をすべて 26.5.1 に統一: - contributing/requirements.txt - .github/workflows/test.yml - .pre-commit-config.yaml あわせて 2024+ stable style に追従して4ファイルを再フォーマット (機能変更なし)。 Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/test.yml | 2 +- .pre-commit-config.yaml | 2 +- contributing/requirements.txt | 2 +- fastlabel/utils/mask_image_util.py | 5 ++++- tests/test_lerobot_v3_parquet.py | 1 + tests/test_pillow_exports.py | 1 + tests/test_workspace_user.py | 1 + 7 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 090fce9..5519fba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: - name: Install Python tools run: | - pip install black==22.10.0 flake8==5.0.4 isort==5.11.5 + pip install black==26.5.1 flake8==5.0.4 isort==5.11.5 - name: Run black run: black --check . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b109223..ed15ad7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 26.5.1 hooks: - id: black files: '^.*\.py' diff --git a/contributing/requirements.txt b/contributing/requirements.txt index 1337533..6e315fd 100644 --- a/contributing/requirements.txt +++ b/contributing/requirements.txt @@ -1,4 +1,4 @@ -black==22.10.0 +black==26.5.1 flake8==5.0.4 isort==5.10.1 pre-commit==2.20.0 diff --git a/fastlabel/utils/mask_image_util.py b/fastlabel/utils/mask_image_util.py index b48f6e6..7001ede 100644 --- a/fastlabel/utils/mask_image_util.py +++ b/fastlabel/utils/mask_image_util.py @@ -67,7 +67,10 @@ def __detect_segmentation_list( segmentation_list.append(segmentation) for separate_place_hierarchy_index in separate_place_hierarchy_indexes: - (segmentation, _,) = __detect_segmentation( + ( + segmentation, + _, + ) = __detect_segmentation( separate_place_hierarchy_index, hierarchy, contours ) segmentation_list.append(segmentation) diff --git a/tests/test_lerobot_v3_parquet.py b/tests/test_lerobot_v3_parquet.py index 417808a..d8e9a7d 100644 --- a/tests/test_lerobot_v3_parquet.py +++ b/tests/test_lerobot_v3_parquet.py @@ -4,6 +4,7 @@ check_dependencies so that pandas/pyarrow major-version bumps surface breakage in CI. """ + import pytest pd = pytest.importorskip("pandas") diff --git a/tests/test_pillow_exports.py b/tests/test_pillow_exports.py index b0f35bc..6352472 100644 --- a/tests/test_pillow_exports.py +++ b/tests/test_pillow_exports.py @@ -4,6 +4,7 @@ save, ImageDraw, and ImageColor calls inside fastlabel/__init__.py so that Pillow major-version bumps surface API breakage in CI. """ + import os import numpy as np diff --git a/tests/test_workspace_user.py b/tests/test_workspace_user.py index 9d3bc8a..e7729ee 100644 --- a/tests/test_workspace_user.py +++ b/tests/test_workspace_user.py @@ -4,6 +4,7 @@ endpoint, query params and payload. The HTTP layer (client.api.*_request) is stubbed so no real request is made. """ + import pytest import fastlabel From fd3fdf2b076b19f31f41708cea9c54a804e1e47a Mon Sep 17 00:00:00 2001 From: yo-tak Date: Fri, 26 Jun 2026 15:01:14 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore(deps):=20=E9=96=8B=E7=99=BA=E3=83=84?= =?UTF-8?q?=E3=83=BC=E3=83=AB(flake8/isort)=E3=81=AE=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=82=B8=E3=83=A7=E3=83=B3=E3=82=923=E7=AE=87=E6=89=80?= =?UTF-8?q?=E3=81=A7=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit contributing/requirements.txt・CI(test.yml)・.pre-commit-config.yaml で flake8/isort のバージョンがズレており、ローカル pre-commit と CI で結果が 食い違う恐れがあったため最新に統一: - flake8: 5.0.4 -> 7.3.0 (contributing/CI を pre-commit に合わせる) - isort: 5.10.1 -> 5.11.5 (contributing を CI/pre-commit に合わせる) flake8 7.3.0 でも既存コードは lint クリーン(コード修正なし)。 Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/test.yml | 2 +- contributing/requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5519fba..6dc97ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: - name: Install Python tools run: | - pip install black==26.5.1 flake8==5.0.4 isort==5.11.5 + pip install black==26.5.1 flake8==7.3.0 isort==5.11.5 - name: Run black run: black --check . diff --git a/contributing/requirements.txt b/contributing/requirements.txt index 6e315fd..7b2f1fe 100644 --- a/contributing/requirements.txt +++ b/contributing/requirements.txt @@ -1,6 +1,6 @@ black==26.5.1 -flake8==5.0.4 -isort==5.10.1 +flake8==7.3.0 +isort==5.11.5 pre-commit==2.20.0 pytest==7.2.0 pytest-dotenv==0.5.2