Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MNT]: Any type hint in subplots #27025

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

Open
faultdiagnosistoolbox opened this issue Oct 7, 2023 · 1 comment
Open

[MNT]: Any type hint in subplots #27025

faultdiagnosistoolbox opened this issue Oct 7, 2023 · 1 comment

Comments

@faultdiagnosistoolbox
Copy link

Summary

I noticed that type inference in vscode didn't work as expected anymore after updating to 3.8.0 from 3.7.3. I tracked it down to that the type hint for the output of subplots() is tuple[Figure, Any] and the ax output didn't get proper intellisense in the IDE.

Proposed fix

Shouldn't the type hint for the output be something like tuple[Figure, Axes | list[Axes]]?

@jklymak
Copy link
Member

jklymak commented Oct 7, 2023

There is discussion at #27001

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

No branches or pull requests

2 participants