Skip to content

chore: Remove level from main and v2 classes init#3558

Open
FBruzzesi wants to merge 5 commits intomainfrom
chore/issue-2932-rm-level
Open

chore: Remove level from main and v2 classes init#3558
FBruzzesi wants to merge 5 commits intomainfrom
chore/issue-2932-rm-level

Conversation

@FBruzzesi
Copy link
Copy Markdown
Member

Description

Not really user facing but I had it started some time ago, so why not finish it 😇

What type of PR is this? (check all applicable)

  • 💾 Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 🔧 Optimization
  • 📝 Documentation
  • ✅ Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

Comment thread narwhals/_utils.py

def inherit_doc(
tp_parent: Callable[P, R1], /
tp_parent: Callable[..., R1], /
Copy link
Copy Markdown
Member Author

@FBruzzesi FBruzzesi Apr 19, 2026

Choose a reason for hiding this comment

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

@dangotbanned you might have a better way of doing this but here what happened - by changing the main namespace __init__ signatures, now the V1 is overriding them and the arguments are different, to so the child ones are not bind to the parent ones - hence removing the P from the parent here.

This meant that return DataFrame(self, level="interchange") was resulting in a typing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove level, DataFrameLike from main, v2

1 participant