Skip to content

Refactor/remove code smell too many statements - #1

Merged
EdivarCr merged 8 commits into
developfrom
refactor/remove-code-smell-too-many-statements
Jun 28, 2026
Merged

Refactor/remove code smell too many statements#1
EdivarCr merged 8 commits into
developfrom
refactor/remove-code-smell-too-many-statements

Conversation

@EdivarCr

Copy link
Copy Markdown
Owner

Aqui está a versão em inglês:

<details>
<summary>Before submitting</summary>

- [x] Self-reviewed the code
- [x] Updated documentation, follow [Google-style](https://google.github.io/styleguide/pyguide.html#383-functions-and-methods)
- [ ] Added docs entry for autogeneration (if new functions/classes)
- [x] Added/updated tests
- [x] All tests pass locally

</details>

## Description

Refactored multiple functions and methods across the `supervision` library to resolve the excess of statements code smell (`too-many-statements` / `R0915`). The logic was simplified, modularized, and broken down into smaller helper functions in the following files:

- `src/supervision/tracker/byte_tracker/core.py`
- `src/supervision/metrics/mean_average_precision.py`
- `src/supervision/detection/vlm.py`
- `src/supervision/detection/utils/internal.py`
- `src/supervision/utils/video.py`
- `src/supervision/key_points/core.py`
- `src/supervision/metrics/detection.py`

## Type of Change

- 🔨 Refactoring (no functional changes)

@EdivarCr
EdivarCr merged commit a11f178 into develop Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant