Closed TheTripleV closed 1 year ago
With #112, it's possible to apply type transformations in a more controlled manner and not even think about imports (almost).
I'm closing the PR since it targets an obsolete library version.
The suggested feature should be implemented similarly to the following class:
Might fix #89 .
Add more thorough detection of numpy usage for inserting the
import numpy
statement. If any module hasreplace_numpy_array
global classname replacement applied to it, that module will now haveimport numpy
added to the stubs.Optionally (with cli flag) generate hints with the nptyping library. This library provides typing support for numpy included typing both the size and dtype in a way that Pylance doesn't error on. The existing numpy _Size hints generate a typing error.