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

Document how to avoid mypy reporting #1400

Open
MarcSkovMadsen opened this issue Aug 27, 2024 · 1 comment
Open

Document how to avoid mypy reporting #1400

MarcSkovMadsen opened this issue Aug 27, 2024 · 1 comment
Labels
type: docs type: enhancement New feature or request

Comments

@MarcSkovMadsen
Copy link
Collaborator

When using .hvplot on a dataframe or series, mypy will report a operator missing problem. See https://mypy.readthedocs.io/en/stable/error_code_list.html#code-operator.

You can solve this by adding # type: ignore[operator]. This is quite cumbersome to add many places in your docs.

It would be very nice if this was discussed and best practices documented in the documentation.

@holoviz holoviz deleted a comment Aug 27, 2024
@holoviz holoviz deleted a comment Aug 27, 2024
@holoviz holoviz deleted a comment Aug 27, 2024
@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Aug 27, 2024

As long as .hvplot is not understood by mypy, ruff etc there will be a lot of friction.

For example ruff configuration in my org requires a return type on functions. Thus I need to add -> hvPlotTabular to all methods returning something generated by hvplot and then mypy complains because return type of .hvplot is not understood because hvplot method is not understood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
@MarcSkovMadsen and others