From 8577307f92356f155a39b3c8e8501759544de560 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 18:15:34 +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/astral-sh/ruff-pre-commit: v0.15.10 → v0.17.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.10...v0.17.3) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d8cb188..11ddc9f8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: additional_dependencies: ["bandit[toml]"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.10 + rev: v0.17.3 hooks: - id: ruff-format - id: ruff From 3bf16b6480be646d9be0ddb52b8a91258acf3e21 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 18:20:29 +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 --- CONTRIBUTING.md | 4 ++++ README.md | 19 ++++++++++--------- docs/index.md | 19 ++++++++++--------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9567a84a..f2643a3c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,6 +84,7 @@ The CLI is built on [typer](https://typer.tiangolo.com/). Each command group is ```python """My command description.""" + from __future__ import annotations from typing import Annotated, Optional import typer @@ -91,6 +92,7 @@ from roboflow.cli._compat import ctx_to_args mycommand_app = typer.Typer(help="Do something", no_args_is_help=True) + @mycommand_app.command("list") def list_things( ctx: typer.Context, @@ -100,6 +102,7 @@ def list_things( args = ctx_to_args(ctx, project=project) _list(args) + def _list(args) -> None: from roboflow.cli._output import output, output_error, suppress_sdk_output @@ -117,6 +120,7 @@ def _list(args) -> None: 2. Register in `roboflow/cli/__init__.py`: ```python from roboflow.cli.handlers.mycommand import mycommand_app + app.add_typer(mycommand_app, name="mycommand") ``` diff --git a/README.md b/README.md index 55a67355..347d73b7 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ To use the Roboflow Python package, you first need to authenticate with your Rob ```python import roboflow + roboflow.login() ``` @@ -148,18 +149,18 @@ workspace = rf.workspace() # creating object detection model that will detect flowers project = workspace.create_project( project_name="Flower detector", - project_type="object-detection", # Or "classification", "instance-segmentation", "semantic-segmentation" - project_license="MIT", # "private" for private projects, only available for paid customers - annotation="flowers" # If you plan to annotate lillys, sunflowers, etc. + project_type="object-detection", # Or "classification", "instance-segmentation", "semantic-segmentation" + project_license="MIT", # "private" for private projects, only available for paid customers + annotation="flowers", # If you plan to annotate lillys, sunflowers, etc. ) # upload a dataset workspace.upload_dataset( dataset_path="./dataset/", num_workers=10, - dataset_format="yolov8", # supports yolov8, yolov5, and Pascal VOC + dataset_format="yolov8", # supports yolov8, yolov5, and Pascal VOC project_license="MIT", - project_type="object-detection" + project_type="object-detection", ) version = project.version("VERSION_NUMBER") @@ -186,10 +187,10 @@ workspace = rf.workspace() # Export images matching a search query workspace.search_export( - query="class:person", # search query (e.g. "tag:review", "class:dog", "*") - format="coco", # annotation format: coco, yolov8, yolov5, voc, etc. - dataset="my-project", # optional: limit to a specific project - location="./my-export", # optional: output directory + query="class:person", # search query (e.g. "tag:review", "class:dog", "*") + format="coco", # annotation format: coco, yolov8, yolov5, voc, etc. + dataset="my-project", # optional: limit to a specific project + location="./my-export", # optional: output directory ) ``` diff --git a/docs/index.md b/docs/index.md index 49d3f7e1..c91c7aa9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -43,6 +43,7 @@ To use the Roboflow Python package, you first need to authenticate with your Rob ```python import roboflow + roboflow.login() ``` @@ -75,18 +76,18 @@ workspace = rf.workspace() # creating object detection model that will detect flowers project = workspace.create_project( project_name="Flower detector", - project_type="object-detection", # Or "classification", "instance-segmentation", "semantic-segmentation" - project_license="MIT", # "private" for private projects, only available for paid customers - annotation="flowers" # If you plan to annotate lillys, sunflowers, etc. + project_type="object-detection", # Or "classification", "instance-segmentation", "semantic-segmentation" + project_license="MIT", # "private" for private projects, only available for paid customers + annotation="flowers", # If you plan to annotate lillys, sunflowers, etc. ) # upload a dataset workspace.upload_dataset( dataset_path="./dataset/", num_workers=10, - dataset_format="yolov8", # supports yolov8, yolov5, and Pascal VOC + dataset_format="yolov8", # supports yolov8, yolov5, and Pascal VOC project_license="MIT", - project_type="object-detection" + project_type="object-detection", ) version = project.version("VERSION_NUMBER") @@ -113,10 +114,10 @@ workspace = rf.workspace() # Export images matching a search query workspace.search_export( - query="class:person", # search query (e.g. "tag:review", "class:dog", "*") - format="coco", # annotation format: coco, yolov8, yolov5, voc, etc. - dataset="my-project", # optional: limit to a specific project - location="./my-export", # optional: output directory + query="class:person", # search query (e.g. "tag:review", "class:dog", "*") + format="coco", # annotation format: coco, yolov8, yolov5, voc, etc. + dataset="my-project", # optional: limit to a specific project + location="./my-export", # optional: output directory ) ```