Skip to content

Commit

Permalink
More messing around with names.
Browse files Browse the repository at this point in the history
This seems to be at it's heart an AutoAPI bug.  Not going to spend forever fighting it.
  • Loading branch information
corranwebster committed Oct 17, 2024
1 parent 562809b commit b7788d8
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Build HTML documentation with Sphinx
run: |
make html
make html SPHINXOPTS="--keep-going -n"
make html SPHINXOPTS="-W --keep-going"
working-directory: docs
- uses: actions/upload-pages-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Build HTML documentation with Sphinx
run: |
make html
make html SPHINXOPTS="--keep-going -n"
make html SPHINXOPTS="-W --keep-going"
working-directory: docs
- uses: actions/upload-artifact@v4
with:
Expand Down
43 changes: 0 additions & 43 deletions docs/source/user_guide/geometries.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ This is the user-guide for Tempe.
introduction.rst
installation.rst
tutorial.rst
geometries.rst
38 changes: 32 additions & 6 deletions src/tempe/markers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import framebuf
from typing import Any

from .geometry import Geometry
from .shapes import ColoredGeometry, BLIT_KEY_RGB565, rectangle
from .shapes import ColoredGeometry, BLIT_KEY_RGB565, rectangle, point_length
from .surface import Surface


Expand All @@ -19,12 +19,27 @@ class Marker:
CROSS = 6


class Markers(ColoredGeometry):
"""Display sized, colored markers at points."""
class Markers(ColoredGeometry[point_length]):
"""Display sized, colored markers at points.
Parameters
----------
geometry : Iterable[geom] | None
The sequence of geometries to render.
colors : Iterable[int] | None
The sequence of colors for each geometry.
markers : Iterable[Any] | None
The sequence of colors for each geometry.
surface : Surface | None
The surface which this shape is associated with.
clip : rectangle | None
An (x, y, w, h) tuple to clip drawing to - anything drawn outside
this region will not show on the display.
"""

def __init__(
self,
geometry: Geometry[tuple[int, int, int]],
geometry: Geometry[point_length],
colors: Iterable[int],
markers: Iterable[Any],
*,
Expand All @@ -34,8 +49,19 @@ class Markers(ColoredGeometry):

def update(
self,
geometry: Geometry[tuple[int, int, int]] | None = None,
geometry: Iterable[point_length] | None = None,
colors: Iterable[int] | None = None,
markers: Iterable[Any] | None = None,
**kwargs: Any,
): ...
):
"""Update the state of the Shape, marking a redraw as needed.
Parameters
----------
geometry : Iterable[geom] | None
The sequence of geometries to render.
colors : Iterable[int] | None
The sequence of colors for each geometry.
markers : Iterable[Any] | None
The sequence of colors for each geometry.
"""
6 changes: 5 additions & 1 deletion src/tempe/shapes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ class Shape:
this region will not show on the display.
"""

def __init__(self, surface: "tempe.surface.Surface | None" = None, clip: rectangle | None = None): ...
def __init__(
self,
surface: "tempe.surface.Surface | None" = None,
clip: rectangle | None = None,
): ...

def draw(self, buffer: FrameBuffer, x: int = 0, y: int = 0) -> None:
"""Render the shape into the given buffer offset by x and y.
Expand Down
2 changes: 1 addition & 1 deletion src/tempe/surface.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Surface:
----------
display : Display
The actual physical display that the surface will be drawn on.
working_buffer : array[int]
working_buffer : array.array[int]
An empty array of unsigned 16-bit ints (ie. ``array('H', ...)``)
that the Surface will use as memory for temporary drawing buffers.
"""
Expand Down

0 comments on commit b7788d8

Please sign in to comment.