Skip to content

chore: remove mypy from CI#12448

Merged
ogabrielluiz merged 1 commit into
release-1.9.0from
chore/replace-mypy-with-ty
Apr 1, 2026
Merged

chore: remove mypy from CI#12448
ogabrielluiz merged 1 commit into
release-1.9.0from
chore/replace-mypy-with-ty

Conversation

@ogabrielluiz
Copy link
Copy Markdown
Contributor

@ogabrielluiz ogabrielluiz commented Apr 1, 2026

Summary

  • Removed mypy from CI -- it hasn't caught any issues in a long time, likely because the config was extremely lenient (follow_imports = "skip", ignore_missing_imports = true)
  • Removed mypy, all types-* stub packages, and [tool.mypy] config sections
  • We evaluated ty as a replacement but it's not mature enough yet -- Pydantic (astral-sh/ty#2403) and SQLModel (astral-sh/ty#2888) support are still missing, which produces too many false positives in our codebase
  • make lint is a no-op for now until we have a viable type checker

@github-actions github-actions Bot added the community Pull Request from an external contributor label Apr 1, 2026
@ogabrielluiz ogabrielluiz changed the title chore: replace mypy with ty for local type checking chore: remove mypy from CI Apr 1, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 1, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bb65beb6-1796-43e0-ad67-a01905571c0d

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

This pull request removes the lint-backend CI job from GitHub Actions and replaces all mypy type-checking tooling with ty across the project configuration files, including updating cache directories, build targets, and dependency specifications.

Changes

Cohort / File(s) Summary
CI/Workflow
.github/workflows/ci.yml
Removed standalone lint-backend job and its conditional execution logic; updated ci_success job dependencies to exclude lint-backend; removed corresponding failure-description branch for the job.
Build Tooling
Makefile
Updated clean_python_cache target to clear .ty_cache instead of .mypy_cache; replaced mypy --namespace-packages -p "langflow" with ty check src/backend/base/langflow in lint target; updated help text from "mypy" to "ty".
Root Development Configuration
pyproject.toml
Removed entire [tool.mypy] section with Pydantic plugin and mypy settings; added [tool.ty] configuration with Python 3.10 version and rule overrides; removed types-* stub packages and mypy from dev dependencies; added ty to dev dependencies.
Backend Development Configuration
src/backend/base/pyproject.toml
Removed types-* stub packages and mypy from dev dependencies; added ty to dev dependencies; replaced [tool.mypy] configuration with [tool.ty.environment] and [tool.ty.rules] sections with Python version and diagnostic suppression rules.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'chore: remove mypy from CI' accurately reflects the main change in the changeset (removing the lint-backend job from CI), though the broader scope includes replacing mypy with ty for local type checking.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Test Coverage For New Implementations ✅ Passed This PR is a tooling migration replacing mypy with ty for type checking, modifying only configuration files with no changes to application code.
Test Quality And Coverage ✅ Passed This PR is a tooling and configuration change replacing mypy with ty for type checking, with no new code implementations introduced.
Test File Naming And Structure ✅ Passed The PR modifies only configuration/workflow files and no test files are added, modified, or removed. Test file structure guidelines are not applicable to this infrastructure-focused change.
Excessive Mock Usage Warning ✅ Passed This PR modifies only configuration and workflow files, with no changes to test files that would be subject to the Excessive Mock Usage Warning check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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/replace-mypy-with-ty

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.

@github-actions github-actions Bot added the lgtm This PR has been approved by a maintainer label Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 28%
28.01% (29184/104184) 64.76% (3717/5739) 30.03% (689/2294)

Unit Test Results

Tests Skipped Failures Errors Time
3014 0 💤 0 ❌ 0 🔥 4m 37s ⏱️

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.86%. Comparing base (389f702) to head (7baa125).
⚠️ Report is 3 commits behind head on release-1.9.0.

❌ Your project status has failed because the head coverage (45.87%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           release-1.9.0   #12448     +/-   ##
================================================
  Coverage          48.86%   48.86%             
================================================
  Files               1897     1896      -1     
  Lines             167656   168352    +696     
  Branches           23193    24429   +1236     
================================================
+ Hits               81928    82271    +343     
- Misses             84817    85158    +341     
- Partials             911      923     +12     
Flag Coverage Δ
backend 54.84% <ø> (-0.05%) ⬇️
frontend 48.15% <ø> (-0.06%) ⬇️
lfx 45.87% <ø> (+0.33%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 218 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
Makefile (1)

100-100: Optional: keep transitional cleanup for legacy mypy cache.

Line 100 removes ty cache correctly; consider also cleaning .mypy_cache for a couple of releases to avoid stale local artifacts on upgraded dev machines.

Suggested diff
-	$(call CLEAR_DIRS,.ty_cache )
+	$(call CLEAR_DIRS,.ty_cache .mypy_cache)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` at line 100, The Makefile currently calls $(call
CLEAR_DIRS,.ty_cache) to remove legacy ty cache; extend this transitional
cleanup to also remove .mypy_cache by updating the CLEAR_DIRS invocation to
include both caches (e.g., pass ".ty_cache .mypy_cache") so that both .ty_cache
and .mypy_cache are cleaned for a couple of releases; locate the CLEAR_DIRS call
in the Makefile (symbol: CLEAR_DIRS, argument ".ty_cache") and add ".mypy_cache"
to the arguments.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Makefile`:
- Line 100: The Makefile currently calls $(call CLEAR_DIRS,.ty_cache) to remove
legacy ty cache; extend this transitional cleanup to also remove .mypy_cache by
updating the CLEAR_DIRS invocation to include both caches (e.g., pass ".ty_cache
.mypy_cache") so that both .ty_cache and .mypy_cache are cleaned for a couple of
releases; locate the CLEAR_DIRS call in the Makefile (symbol: CLEAR_DIRS,
argument ".ty_cache") and add ".mypy_cache" to the arguments.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ae50c24a-8328-43af-9fe0-fe0a70993405

📥 Commits

Reviewing files that changed from the base of the PR and between 08bf984 and dab1b12.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • Makefile
  • pyproject.toml
  • src/backend/base/pyproject.toml
💤 Files with no reviewable changes (1)
  • .github/workflows/ci.yml

@ogabrielluiz ogabrielluiz removed the community Pull Request from an external contributor label Apr 1, 2026
@ogabrielluiz ogabrielluiz changed the base branch from main to release-1.9.0 April 1, 2026 20:06
mypy hasn't caught issues in a long time due to its lenient config
(follow_imports=skip, ignore_missing_imports=true). We evaluated ty as
a replacement but it lacks Pydantic and SQLModel support, producing too
many false positives. Removing the type checker until a viable
alternative matures.
@ogabrielluiz ogabrielluiz force-pushed the chore/replace-mypy-with-ty branch from 56c1e0b to 7baa125 Compare April 1, 2026 20:09
@ogabrielluiz ogabrielluiz enabled auto-merge April 1, 2026 20:10
@ogabrielluiz ogabrielluiz added this pull request to the merge queue Apr 1, 2026
Merged via the queue into release-1.9.0 with commit 9f255dc Apr 1, 2026
91 of 92 checks passed
@ogabrielluiz ogabrielluiz deleted the chore/replace-mypy-with-ty branch April 1, 2026 20:58
Adam-Aghili pushed a commit that referenced this pull request Apr 15, 2026
chore: remove mypy from CI and dev dependencies

mypy hasn't caught issues in a long time due to its lenient config
(follow_imports=skip, ignore_missing_imports=true). We evaluated ty as
a replacement but it lacks Pydantic and SQLModel support, producing too
many false positives. Removing the type checker until a viable
alternative matures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants