balancap / arrowbic

Pythonic Apache Arrow
Apache License 2.0
6 stars 0 forks source link

Add generic typing to Arrowbic base extension type #17

Open balancap opened 2 years ago

balancap commented 2 years ago

Adding generic typing is improving the general code quality, as well as, making usability of the library better in common IDEs (VS code, ...)

balancap commented 2 years ago

Currently blocked by issue in PyArrow implementation: it does not support generic extension type, i.e.


TItem = TypeVar("TItem")

class BaseExtensionType(pa.ExtensionType, Generic[TItem]):
    pass

will lead a failure when calling pa.ExtensionArray.from_storage factory method.

Implementing the generic feature only for ExtensionArray at the moment, in #18