Skip to content

Commit

Permalink
add polygon_to_cells_experimental.
Browse files Browse the repository at this point in the history
Contains coverage and lint errors -- just checking that they raise in CI
  • Loading branch information
ajfriend committed Jan 27, 2025
1 parent 4b805bf commit fd13c95
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/h3/api/basic_int/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,12 @@ def uncompact_cells(cells, res):

return _out_collection(hu)

def polygon_to_cells(h3shape, res):

Check failure on line 470 in src/h3/api/basic_int/__init__.py

View workflow job for this annotation

GitHub Actions / Lint and Coverage

Ruff (E302)

src/h3/api/basic_int/__init__.py:470:1: E302 Expected 2 blank lines, found 1
"""
Alias for ``h3shape_to_cells``.
"""
return h3shape_to_cells(h3shape, res)


def h3shape_to_cells(h3shape, res):
"""
Expand Down Expand Up @@ -519,11 +525,15 @@ def h3shape_to_cells(h3shape, res):
return _out_collection(mv)


def polygon_to_cells(h3shape, res):
def polygon_to_cells_experimental(
h3shape: H3Shape,
res: int,
contain: Literal['center', 'full', 'overlap', 'bbox_overlap'] = 'center',
):
"""
Alias for ``h3shape_to_cells``.
Alias for ``h3shape_to_cells_experimental``.
"""
return h3shape_to_cells(h3shape, res)
return h3shape_to_cells_experimental(h3shape, res, contain)


def h3shape_to_cells_experimental(
Expand Down

0 comments on commit fd13c95

Please sign in to comment.