Skip to content

Commit

Permalink
no relative imports
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Sep 25, 2023
1 parent 9e7b186 commit edc0886
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
8 changes: 4 additions & 4 deletions geoarrow-pyarrow/src/geoarrow/pyarrow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from geoarrow.c.lib import GeometryType, Dimensions, CoordType, EdgeType, CrsType

from ._type import (
from geoarrow.pyarrow._type import (
VectorType,
WktType,
WkbType,
Expand All @@ -35,11 +35,11 @@
unregister_extension_types,
)

from ._kernel import Kernel
from geoarrow.pyarrow._kernel import Kernel

from ._array import array
from geoarrow.pyarrow._array import array

from . import _scalar
from geoarrow.pyarrow import _scalar

from ._compute import (
parse_all,
Expand Down
12 changes: 10 additions & 2 deletions geoarrow-pyarrow/src/geoarrow/pyarrow/_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

from geoarrow.c import lib

from ._kernel import Kernel
from ._type import WktType, WkbType, VectorType, wkb, wkt, large_wkb, large_wkt
from geoarrow.pyarrow._kernel import Kernel
from geoarrow.pyarrow._type import (
WktType,
WkbType,
VectorType,
wkb,
wkt,
large_wkb,
large_wkt,
)


class VectorArray(pa.ExtensionArray):
Expand Down
6 changes: 3 additions & 3 deletions geoarrow-pyarrow/src/geoarrow/pyarrow/_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import pyarrow.compute as pc

from geoarrow.c.lib import GeometryType, Dimensions, CoordType, EdgeType
from . import _type
from ._array import array
from ._kernel import Kernel
from geoarrow.pyarrow import _type
from geoarrow.pyarrow._array import array
from geoarrow.pyarrow._kernel import Kernel

_max_workers = 1

Expand Down
4 changes: 2 additions & 2 deletions geoarrow-pyarrow/src/geoarrow/pyarrow/_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import pyarrow.compute as _compute
import pyarrow.parquet as _pq
from geoarrow.c.lib import CoordType
from ._type import wkt, wkb, VectorType
from ._kernel import Kernel
from geoarrow.pyarrow._type import wkt, wkb, VectorType
from geoarrow.pyarrow._kernel import Kernel


class GeoDataset:
Expand Down
2 changes: 1 addition & 1 deletion geoarrow-pyarrow/src/geoarrow/pyarrow/_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pyarrow as pa

from geoarrow.c import lib
from ._type import VectorType
from geoarrow.pyarrow._type import VectorType


class Kernel:
Expand Down
3 changes: 2 additions & 1 deletion geoarrow-pyarrow/src/geoarrow/pyarrow/_scalar.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pyarrow as pa

from ._type import VectorType
from geoarrow.pyarrow._type import VectorType


class VectorScalar(pa.ExtensionScalar):
Expand Down Expand Up @@ -51,6 +51,7 @@ def scalar_cls_from_name(name):
else:
raise ValueError(f'Expected valid extension name but got "{name}"')


# Inject array_cls_from_name exactly once to avoid circular import
if VectorType._scalar_cls_from_name is None:
VectorType._scalar_cls_from_name = scalar_cls_from_name

0 comments on commit edc0886

Please sign in to comment.