Sergei Izmailov
Sergei Izmailov
Using `KeysView`/`ValuesView`/`ItemsView` across sub modules can result in "can't find/import" error
The error message `Can't find/import 'my_native_module.module_a.KeysView'` is factually correct. The `my_native_module.module_a` does not have `KeyView`, but has `KeysView[my_native_module.module_a.MyKeyA]` (sic!). The root problem is that pybind11 generates classes with brackets in...
> What do you think, is this a useful direction? Could stubgen be updated to process Annotated as desired? What would be the desired output? The following should be easily...
`type`, `exception`, `memoryview` and `bytearray` also miss the `handle_type_name`. Not sure about `dtype`, `module_`, `generic_type` and `exception`, since they are not in `pytypes.h`. The rest seems to be properly handled....
Thanks for identifying the problem. I agree that `...` is a poor choice for representing invalid expressions. I think it's better to introduce a wrapper similar to the one proposed...
I don't think `object` is an option at all. Let's say we have a library with problematic bindings. It has an author and an end user. The user should not...
Do you have an example?
IMO, the 0.1% of use cases definitely falls into "use stubgen as library and tweak it for your use case". It would be unfair to bother everyone else with extra...
I didn't return to the problem for quite some time and I'm not planning to in foreseeable future. So closing as not planned.
The issue with all imports should be resolved with #112
@bluenote10 Initially, I was unsatisfied with how `mypy.stubgen` performed on my pet project, and I decided to make a tool to get things done quickly. At some point, I thought...