When we submitted PR that adds the stdlib/_ctypes.pyi(#8582), imports some stuffs from ctypes.
But the implementation imports some stuffs from _ctypes to ctypes.
However, trying to write type stubs as close as possible to the implementation would result in circular imports if we just move definitions around.
- For example, CDLL in args of _CData methods.
- In implementation...
- CDLLL is defined in ctypes
- _CData(base class of _SimpleCData) is defined in _ctypes.
- Some PRs, such as delete _importlib_modulespec #5350, were merged as "should be fine in pyi files" even if they are circular imports.
Any opinions would be appreciated.
Reactions are currently unavailable
When we submitted PR that adds the stdlib/_ctypes.pyi(#8582), imports some stuffs from ctypes.
But the implementation imports some stuffs from _ctypes to ctypes.
However, trying to write type stubs as close as possible to the implementation would result in circular imports if we just move definitions around.
Any opinions would be appreciated.