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

matplotlib.pyplot.close optional argument #181

Closed DeltaSigma130 closed 3 years ago

DeltaSigma130 commented 3 years ago

matplotlib.pyplot.close has None as a default argument, however, the stub does not specify None.

https://matplotlib.org/api/_as_gen/matplotlib.pyplot.close.html#matplotlib.pyplot.close

Shouldn't line 217 in https://github.com/predictive-analytics-lab/data-science-types/blob/master/matplotlib-stubs/pyplot.pyi.in be changed from the first to the second?

def close(fig: Union[Figure, Literal["all"]]) -> None: ...
def close(fig: Union[Figure, Literal["all"], None]) -> None: ...
tmke8 commented 3 years ago

Thanks for the report!