wearepal / data-science-types

Mypy stubs, i.e., type information, for numpy, pandas and matplotlib
Apache License 2.0
202 stars 52 forks source link

Wrong type in matplotlib's subplot. #226

Closed listout closed 3 years ago

listout commented 3 years ago

Warning does not shows when data-science-types is not installed, I'm not quite sure if this is types issue of Pyright's issue.

Minimal Code:

import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 2 * np.pi, 400)
y = np.sin(x ** 2)
fig, ax = plt.subplots()
ax.plot(x, y)
ax.set_title('A Single Plot')
plt.show()

Warning:

test