Skip to content

armgit / rembg

Public Imported from GitHub
0

Rembg is a tool to remove images background

fix: bump black to ^26.3.1 for CVE-2026-32274

Daniel Gatis17820f0ffd3c
diff --git a/pyproject.toml b/pyproject.toml
index ee2ff5f..fdc5857 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -58,7 +58,7 @@ watchdog = {version = "^6.0.0", optional = true}
# Dev dependencies (optional, for pip install .[dev])
bandit = {version = "^1.9.2", optional = true}
-black = {version = "^25.12.0", optional = true}
+black = {version = "^26.3.1", optional = true}
flake8 = {version = "^7.3.0", optional = true}
imagehash = {version = "^4.3.2", optional = true}
isort = {version = "^7.0.0", optional = true}
@@ -67,7 +67,7 @@ pytest = {version = "^9.0.2", optional = true}
[tool.poetry.group.dev.dependencies]
bandit = "^1.9.2"
-black = "^25.12.0"
+black = "^26.3.1"
flake8 = "^7.3.0"
imagehash = "^4.3.2"
isort = "^7.0.0"
diff --git a/tests/test_remove.py b/tests/test_remove.py
index 650f14d..b47430e 100644
--- a/tests/test_remove.py
+++ b/tests/test_remove.py
@@ -10,11 +10,12 @@ here = Path(__file__).parent.resolve()
failures_dir = here / "failures"
failures_dir.mkdir(exist_ok=True)
+
def test_remove():
kwargs = {
"sam": {
- "anime-girl-1" : {
- "sam_prompt" :[{"type": "point", "data": [400, 165], "label": 1}],
+ "anime-girl-1": {
+ "sam_prompt": [{"type": "point", "data": [400, 165], "label": 1}],
}
}
}
@@ -34,13 +35,17 @@ def test_remove():
"birefnet-dis",
"birefnet-hrsod",
"birefnet-cod",
- "birefnet-massive"
+ "birefnet-massive",
]:
for picture in ["anime-girl-1"]:
image_path = Path(here / "fixtures" / f"{picture}.jpg")
image = image_path.read_bytes()
- actual = remove(image, session=new_session(model), **kwargs.get(model, {}).get(picture, {}))
+ actual = remove(
+ image,
+ session=new_session(model),
+ **kwargs.get(model, {}).get(picture, {}),
+ )
actual_hash = hash_img(Image.open(BytesIO(actual)))
expected_path = Path(here / "results" / f"{picture}.{model}.png")