ronaldoussoren / pyobjc

The Python <-> Objective-C Bridge with bindings for macOS frameworks
https://pyobjc.readthedocs.io
575 stars 47 forks source link

Add typing stubs for pyobjc-core #417

Open ronaldoussoren opened 2 years ago

ronaldoussoren commented 2 years ago

The first step for adding typing support to all of PyObjC is to add typing support for PyObjC-core:

Some challenges in all of this:

ronaldoussoren commented 2 years ago

Another challenge is "objc.lookUpClass", its result is a particular type. For now I have it return objc_object, but requires more tweaks in pyobjc-core to work properly...

I'm not sure how to handle this without writing a mypy plugin, or keeping the current mess of casting.