-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Originally posted in #19307 (comment) (slightly edited):
I'm seeing a bunch of new errors pop up when running stubtest on scipy-stubs using mypy master (ffe2db8).
All errors are seem to be related to __cinit__ Cython methods:
scipy.io.matlab._mio5_utils.VarReader5(not public api)scipy.stats._unuran.unuran_wrapper.TransformedDensityRejection, re-exported asscipy.stats.sampling.TransformedDensityRejectionscipy.stats._unuran.unuran_wrapper.SimpleRatioUniforms, re-exported asscipy.stats.sampling.SimpleRatioUniformsscipy.stats._unuran.unuran_wrapper.NumericalInversePolynomial, re-exported asscipy.stats.sampling.NumericalInversePolynomialscipy.stats._unuran.unuran_wrapper.NumericalInverseHermite, re-exported asscipy.stats.sampling.NumericalInverseHermitescipy.stats._unuran.unuran_wrapper.DiscreteAliasUrn, re-exported asscipy.stats.sampling.DiscreteAliasUrnscipy.stats._unuran.unuran_wrapper.DiscreteGuideTable, re-exported asscipy.stats.sampling.DiscreteGuideTable
Each parameter is reported as a separate error, and aliases are counted double, which causes 75 errors to be reported here.
I must admit that I know very little about cython and the C-side of cpython, so I'm not able to see why this is happening. But the fact that these only occur in case of these __cinit__ methods is kinda sus afaik.
Oh and here are the errors: https://gist.github.com/jorenham/3d41e79607bcc1f45267acc1566833d2
This might also be relevant infomation:
>>> from scipy.stats._unuran.unuran_wrapper import TransformedDensityRejection
>>> TransformedDensityRejection.__init__.__text_signature__
'($self, /, *args, **kwargs)'So it's kinda odd that stubtest says it's def (self) at runtime, right?