Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(python): Use a contravariant typevar for df.cast #19499

Closed
wants to merge 1 commit into from

Conversation

etrotta
Copy link
Contributor

@etrotta etrotta commented Oct 28, 2024

Adjust the typing annotations for the DataFrame.cast and LazyFrame.cast methods such that mypy/ruff do complain about passing an instance of pl.Schema, which already works in practice.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Oct 28, 2024
@etrotta etrotta mentioned this pull request Oct 29, 2024
2 tasks
@etrotta
Copy link
Contributor Author

etrotta commented Oct 29, 2024

Never mind, that does not works at all. It doesn't complains if you pass an actually incorrect type

@etrotta etrotta closed this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant