From ecef011b36692cafd7525953afce0aff7596daf3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:45:36 +0000 Subject: [PATCH 1/2] =?UTF-8?q?chore(pre=5Fcommit):=20=E2=AC=86=20pre=5Fco?= =?UTF-8?q?mmit=20autoupdate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/PyCQA/bandit: 1.7.9 → 1.8.2](https://github.com/PyCQA/bandit/compare/1.7.9...1.8.2) - [github.com/astral-sh/ruff-pre-commit: v0.6.4 → v0.9.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.4...v0.9.2) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7946a926..1e5bf431 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -24,14 +24,14 @@ repos: - id: trailing-whitespace - repo: https://github.com/PyCQA/bandit - rev: 1.7.9 + rev: 1.8.2 hooks: - id: bandit args: ["-c", "pyproject.toml"] additional_dependencies: ["bandit[toml]"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.4 + rev: v0.9.2 hooks: - id: ruff-format - id: ruff From ee9798cd50c41ad564aed537bc692ae7fa589aa4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:46:09 +0000 Subject: [PATCH 2/2] =?UTF-8?q?fix(pre=5Fcommit):=20=F0=9F=8E=A8=20auto=20?= =?UTF-8?q?format=20pre-commit=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_project.py | 6 +++--- tests/test_queries.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_project.py b/tests/test_project.py index 84b99f96..99377e8c 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -30,7 +30,7 @@ def test_check_valid_image_with_unaccepted_formats(self): def test_upload_raises_upload_image_error(self): responses.add( responses.POST, - f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}" f"&batch={DEFAULT_BATCH_NAME}", + f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}&batch={DEFAULT_BATCH_NAME}", json={ "error": { "message": "Invalid image.", @@ -56,7 +56,7 @@ def test_upload_raises_upload_annotation_error(self): # Image upload responses.add( responses.POST, - f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}" f"&batch={DEFAULT_BATCH_NAME}", + f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}&batch={DEFAULT_BATCH_NAME}", json={"success": True, "id": image_id}, status=200, ) @@ -64,7 +64,7 @@ def test_upload_raises_upload_annotation_error(self): # Annotation responses.add( responses.POST, - f"{API_URL}/dataset/{PROJECT_NAME}/annotate/{image_id}?api_key={ROBOFLOW_API_KEY}" f"&name={image_name}", + f"{API_URL}/dataset/{PROJECT_NAME}/annotate/{image_id}?api_key={ROBOFLOW_API_KEY}&name={image_name}", json={ "error": { "message": "Image was already annotated.", diff --git a/tests/test_queries.py b/tests/test_queries.py index c9a26ed0..93c29179 100644 --- a/tests/test_queries.py +++ b/tests/test_queries.py @@ -47,7 +47,7 @@ def test_project_methods(self): # Upload image responses.add( responses.POST, - f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}" f"&batch={DEFAULT_BATCH_NAME}", + f"{API_URL}/dataset/{PROJECT_NAME}/upload?api_key={ROBOFLOW_API_KEY}&batch={DEFAULT_BATCH_NAME}", json={"duplicate": True, "id": "hbALkCFdNr9rssgOUXug"}, status=200, )