diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d22a43ac..cd129b1e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: - repo: https://github.com/PyCQA/bandit - rev: '1.7.7' + rev: '1.7.8' hooks: - id: bandit args: ["-c", "pyproject.toml"] @@ -46,7 +46,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.2 + rev: v0.3.2 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/supervision/metrics/detection.py b/supervision/metrics/detection.py index 71007d71..99a11322 100644 --- a/supervision/metrics/detection.py +++ b/supervision/metrics/detection.py @@ -836,10 +836,10 @@ class MeanAveragePrecision: precision = true_positives / (true_positives + false_positives) for iou_level_idx in range(matches.shape[1]): - average_precisions[ - class_idx, iou_level_idx - ] = MeanAveragePrecision.compute_average_precision( - recall[:, iou_level_idx], precision[:, iou_level_idx] + average_precisions[class_idx, iou_level_idx] = ( + MeanAveragePrecision.compute_average_precision( + recall[:, iou_level_idx], precision[:, iou_level_idx] + ) ) return average_precisions