Skip to content

[python-package] Fix mypy checks in plotting.py #6899

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

Closed
wants to merge 1 commit into from

Conversation

borchero
Copy link
Collaborator

Motivation

mypy currently fails with 36 errors in 6 files. One of these files is plotting.py.

Changes

This PR fixes the typing issues in plotting.py, eliminating 1 error and 1 file with errors.

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Similar to my comments on #6898 and #6900, can you please add the warnings from mypy to the PR description, so we know what specific problem this is attempting to fix?

@jameslamb
Copy link
Collaborator

can you please add the warnings from mypy to the PR description, so we know what specific problem this is attempting to fix?

I want to move this forward, so I ran mypy locally and looked at CI logs myself.

Neither showed anything about this line. In a recent PR CI run of the lint task, there was only 1 mypy finding about plotting.py:

python-package/lightgbm/plotting.py:143: error: Argument 2 to "text" of "Axes" has incompatible type "signedinteger[Any]"; expected "float"  [arg-type]

(build link)

That doesn't look related to the changes in this PR.

I'm closing this. In the future, please:

@jameslamb jameslamb closed this Jul 29, 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.

2 participants