Skip to content

chore(workers): drop redundant black/isort/flake8 dev deps#2021

Open
jaseemjaskp wants to merge 2 commits into
mainfrom
chore/workers-drop-redundant-lint-deps
Open

chore(workers): drop redundant black/isort/flake8 dev deps#2021
jaseemjaskp wants to merge 2 commits into
mainfrom
chore/workers-drop-redundant-lint-deps

Conversation

@jaseemjaskp
Copy link
Copy Markdown
Contributor

What

  • Remove black, isort, and flake8 from the dev dependency group in workers/pyproject.toml.
  • Remove the now-dead [tool.black] and [tool.isort] config sections.
  • Resync workers/uv.lock (drops black/isort/flake8 and their transitive deps: mccabe, pycodestyle, pyflakes, pytokens).

Why

  • These three tools are fully replaced by ruff, which is configured repo-wide in the root pyproject.toml ([tool.ruff.lint] + [tool.ruff.format]) and runs globally via .pre-commit-config.yaml (ruff + ruff-format).
  • ruff already covers: import sorting (I = isort), flake8 plugin rules (ANN/TCH/PYI), and formatting (ruff-format ≈ black).
  • The workers dev group and its [tool.black]/[tool.isort] sections were leftovers from before the ruff migration — redundant install + dead config.

How

  • Edited the dev group and deleted the stale tool sections, then ran uv lock.
  • Verified no Makefile, shell script, or CI workflow invokes black/isort/flake8 directly (only via pre-commit), so removal is safe.
  • Kept mypy (+ its [tool.mypy] config) since ruff does not type-check, and pytest*/debugpy which are still needed.

Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

  • No. This only touches dev tooling dependencies. Linting/formatting continue to work via the repo-wide ruff pre-commit hooks. No runtime/production code or dependencies are affected.

Database Migrations

  • None.

Env Config

  • None.

Relevant Docs

  • None.

Related Issues or PRs

  • None.

Dependencies Versions

  • Removed (dev only): black, isort, flake8 and transitive deps mccabe, pycodestyle, pyflakes, pytokens.

Notes on Testing

  • No behavioural change. Pre-commit ruff/ruff-format hooks pass. uv lock resolves cleanly.

Screenshots

Checklist

I have read and understood the Contribution Guidelines.

Formatting, import-sorting and linting are handled repo-wide by ruff
(configured in root pyproject.toml and run via .pre-commit-config.yaml).
The workers dev group still carried black/isort/flake8 plus their dead
[tool.black]/[tool.isort] config sections, which ruff fully replaces.

Removes the three deps and their config; resyncs uv.lock. Keeps mypy
(ruff does not type-check) and pytest/debugpy.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 8, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1cc6903d-e42c-474b-9d18-50a0cfae5555

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The PR consolidates development tooling by removing individual formatter and linter packages (black, isort, flake8) from the workers package dependencies and their corresponding configuration blocks, replacing them with comments indicating repo-wide formatting and import-sorting is now handled by ruff.

Changes

Development tooling consolidation

Layer / File(s) Summary
Consolidate dev tooling to ruff
workers/pyproject.toml
Removes black, isort, and flake8 from the dev dependency group and adds comments stating formatting/import-sorting are handled by ruff repo-wide. The [tool.black] and [tool.isort] configuration blocks are also removed.

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: dropping redundant black/isort/flake8 dev dependencies from the workers package.
Description check ✅ Passed The PR description is comprehensive and follows the template structure, covering all critical sections including What, Why, How, impact assessment, and testing notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/workers-drop-redundant-lint-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 8, 2026

Greptile Summary

This PR removes black, isort, and flake8 from the workers package's dev dependency group, along with their now-dead [tool.black] and [tool.isort] config sections, and resyncs workers/uv.lock. These tools are fully superseded by ruff and ruff-format, which are configured at the repo root and run via pre-commit hooks.

  • workers/pyproject.toml: Drops black, isort, flake8 from [dependency-groups.dev] and removes their stale [tool.black] / [tool.isort] TOML sections; mypy and test tooling are intentionally kept.
  • workers/uv.lock: Removes lock entries for black, flake8, isort, and their transitive deps (mccabe, pycodestyle, pyflakes, pytokens) — exactly the seven packages that were exclusively pulled in by the removed dev deps.
  • Root uv.lock (noted in a prior review thread): Contains ~4,372 unintended lines of churn where upload-time fields are stripped and the file revision drops from 3 to 1; only workers/uv.lock needed to change for this PR.

Confidence Score: 5/5

Safe to merge once the unintended root uv.lock churn (previously flagged) is addressed; the workers-scoped changes are correct and complete.

The workers/pyproject.toml and workers/uv.lock changes are a straightforward, correctly-scoped dev-tooling cleanup: exactly the seven packages pulled in by the removed deps are dropped from the lock file, mypy and test tooling are untouched, and the repo-wide ruff setup already covers formatting and linting. No production or runtime code is touched.

The root uv.lock has ~4,372 lines of unintended churn from an accidental re-generation (revision 3→1, upload-time fields stripped); it was flagged in a prior review thread and should be reverted before merge.

Important Files Changed

Filename Overview
workers/pyproject.toml Removes black/isort/flake8 from dev deps and deletes their stale config sections; adds an inline comment explaining the ruff migration rationale. No runtime or production changes.
workers/uv.lock Drops lock entries for exactly the seven packages removed in pyproject.toml (black, flake8, isort, mccabe, pycodestyle, pyflakes, pytokens); all other entries are unchanged.
uv.lock Unintended regeneration strips upload-time fields from every package entry and downgrades the lock revision from 3 to 1; previously flagged in review — no dependency hashes changed, but the churn is noisy and should be reverted.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before["Before this PR (workers dev deps)"]
        B1[black] --> L[Lint / Format]
        B2[isort] --> L
        B3[flake8] --> L
        B4[ruff - repo root] --> L
    end

    subgraph After["After this PR (workers dev deps)"]
        A1[ruff - repo root only] --> L2[Lint / Format / Import Sort]
    end

    subgraph Kept["Still in workers dev deps"]
        K1[mypy] --> TC[Type Checking]
        K2[pytest / pytest-asyncio / pytest-mock / pytest-cov] --> T[Testing]
        K3[debugpy] --> D[Debugging]
    end
Loading

Reviews (2): Last reviewed commit: "Commit uv.lock changes" | Re-trigger Greptile

Comment thread uv.lock
Comment on lines 1 to 5
version = 1
revision = 3
revision = 1
requires-python = "==3.12.*"

[[package]]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unintended root lock-file regeneration

The root uv.lock has ~4,372 lines of changes not described in the PR: every package entry has its upload-time field stripped and the lock-file revision drops from 3 to 1. No packages or hashes changed, so dependency resolution is not affected, but this indicates the root lock file was accidentally regenerated with a different (older) version of uv. The revision downgrade could cause uv sync to re-bump the revision on the next run for any team member or CI job using a newer uv, creating a noisy churn cycle. It would be cleaner to revert the root uv.lock to its pre-PR state, since the intended change only touches workers/uv.lock.

Prompt To Fix With AI
This is a comment left during a code review.
Path: uv.lock
Line: 1-5

Comment:
**Unintended root lock-file regeneration**

The root `uv.lock` has ~4,372 lines of changes not described in the PR: every package entry has its `upload-time` field stripped and the lock-file `revision` drops from `3` to `1`. No packages or hashes changed, so dependency resolution is not affected, but this indicates the root lock file was accidentally regenerated with a different (older) version of `uv`. The `revision` downgrade could cause `uv sync` to re-bump the revision on the next run for any team member or CI job using a newer `uv`, creating a noisy churn cycle. It would be cleaner to revert the root `uv.lock` to its pre-PR state, since the intended change only touches `workers/uv.lock`.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Claude Code

Copy link
Copy Markdown
Contributor Author

@jaseemjaskp jaseemjaskp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR review (PR Review Toolkit). This is a pure dependency/lock chore — no application code, types, error-handling, or tests are touched, so the Silent Failure Hunter, Type Design Analyzer, PR Test Analyzer, and Code Simplifier passes have no applicable surface. The substantive review is dependency/lockfile correctness.

Summary

  • workers/pyproject.toml and workers/uv.lock: clean and exactly match the stated intent (drop black/isort/flake8 + their [tool.black]/[tool.isort] config and 7 transitive deps; keep mypy; workers/uv.lock stays at revision = 3). LGTM.
  • Root uv.lock: unintended format downgrade — see inline comment. This is the one blocking item.

Comment thread uv.lock
@jaseemjaskp jaseemjaskp force-pushed the chore/workers-drop-redundant-lint-deps branch from 135099d to 6a7b793 Compare June 8, 2026 07:16
@jaseemjaskp
Copy link
Copy Markdown
Contributor Author

Fixed. The root uv.lock regeneration came from a stray Commit uv.lock changes commit (135099d) that downgraded revision 3→1 and stripped upload-time metadata. I've dropped that commit via force-push — the branch now contains only the original 6a7b79310 commit touching workers/pyproject.toml + workers/uv.lock. Root uv.lock is back to its pre-PR state (revision = 3, untouched).

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 8, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 8, 2026

Unstract test results

Per-group results

Status Group Tier Passed Failed Errors Skipped Duration (s)
unit-connectors unit 64 12 0 3 16.9
unit-core unit 0 0 2 0 1.2
unit-platform-service unit 9 0 1 0 1.4
unit-prompt-service unit 15 0 0 0 20.4
unit-rig unit 53 0 0 0 3.4
unit-runner unit 11 0 0 0 3.1
unit-sdk1 unit 381 0 0 0 20.9
unit-tool-registry unit 0 0 1 0 1.4
unit-workers unit 0 0 0 0 17.5
TOTAL 533 12 4 3 86.2

Critical paths

⚠️ Critical paths not yet covered

  • auth-login — User can log in and obtain a session cookie. (entry: POST /api/v1/auth/login; declared coverage: no groups declared)
  • adapter-register-llm — Register and validate an LLM adapter. (entry: POST /api/v1/adapter/; declared coverage: no groups declared)
  • workflow-create-execute — Create a workflow, configure source+destination, execute, poll, fetch result. (entry: POST /api/v1/workflow/{id}/execute/; declared coverage: e2e-workflow)
  • api-deployment-run — Deploy a workflow as an API, POST a document, receive structured JSON. (entry: POST /deployment/api/{org}/{name}/; declared coverage: e2e-api-deployment)
  • prompt-studio-fetch-response — Prompt Studio: create project, add prompt, run single-pass, get response. (entry: POST /api/v1/prompt-studio/prompt-studio-tool/{id}/fetch_response/; declared coverage: e2e-prompt-studio)
  • pipeline-etl-execute — Run an ETL pipeline from source connector to destination. (entry: POST /api/v1/pipeline/{id}/execute/; declared coverage: no groups declared)
  • usage-token-tracking — Per-execution token usage is recorded and retrievable. (entry: GET /api/v1/usage/get_token_usage/; declared coverage: no groups declared)
  • workflow-execution-fan-out — Multi-file workflow execution fans out to file-processing workers and rejoins. (entry: internal: backend → rabbitmq → workers/file_processing; declared coverage: no groups declared)
  • callback-result-delivery — Async results are posted back via the callback worker. (entry: internal: workers/callback → backend /internal endpoints; declared coverage: no groups declared)
✅ Covered critical paths
  • tool-sandbox-exec — covered by unit-runner

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