Skip to content

Conversation

delsner
Copy link
Member

@delsner delsner commented Jul 23, 2025

Motivation

Closes #54.

Changes

Discontinue mypy plugin features that are hard to maintain and provide limited value.

@delsner delsner self-assigned this Jul 23, 2025
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (545f177) to head (1e6a7ec).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #103   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           51        50    -1     
  Lines         2913      2901   -12     
=========================================
- Hits          2913      2901   -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@delsner delsner marked this pull request as ready for review July 23, 2025 17:37
@borchero borchero added this to the v2 milestone Jul 26, 2025
Copy link
Member

@borchero borchero left a comment

Choose a reason for hiding this comment

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

That's a lot of complexity gone 😅

@runkelcorey
Copy link

runkelcorey commented Sep 9, 2025

I'm a little confused on the scope of this change. Will mypy still be able to validate some rules of some collections?

@borchero
Copy link
Member

borchero commented Sep 10, 2025

Sorry for the confusion @runkelcorey! All the features that you'd expect from mypy will still work when this is merged.

First of all, this change only has an effect if you use dataframely's mypy plugin. Even then, the only things that change are the following:

  • Calling iter_rows(named=True) on a dy.DataFrame does not return an iterator of TypedDicts with the correct keys and values anymore but a dict[str, Any], just like polars.
  • When filtering a collection, the returned failure info dictionary is not a TypedDict anymore but a dict[str, dy.FailureInfo].

Both of these things did more harm than good. The former was sometimes evaluated incorrectly when mypy used caching. The latter caused the user to not be able to use the failure info dictionary as dict[str, dy.FailureInfo] (because a TypedDict is not interpreted as such). Hence, we decided to remove these two things (which also caused plenty of complexity).

So tl;dr: if you do not rely on these two things, this PR won't have an effect on your usage.

@delsner delsner enabled auto-merge (squash) October 17, 2025 08:10
@delsner delsner merged commit 1049f81 into main Oct 17, 2025
22 checks passed
@delsner delsner deleted the discontinue-mypy-plugin branch October 17, 2025 08:12
@borchero borchero changed the title refactor: Discontinue most parts of mypy plugin refactor!: Discontinue most parts of mypy plugin Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dataframely mypy plugin: Inheritance not supported by TypedDict

3 participants