-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add .pyi files with more comprehensive docstrings (#10)
This both improves the API documentation, and allows IDEs to type hint better.
- Loading branch information
1 parent
d8ae81c
commit 5bcc456
Showing
22 changed files
with
1,002 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"""Internal implementation for numeric operations on DataViews.""" | ||
|
||
__all__ = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
from array import array | ||
from collections.abc import Sequence, Iterable | ||
import framebuf | ||
from typing import Any | ||
|
||
from .shapes import ColoredGeometry, Shape, BLIT_KEY_RGB565, point, rectangle | ||
|
||
|
||
class Bitmaps(Shape): | ||
"""Draw framebuffer bitmaps at points""" | ||
|
||
def __init__( | ||
self, | ||
geometry: Iterable[point], | ||
buffers: Iterable[framebuf.FrameBuffer], | ||
*, | ||
key: int | None = None, | ||
palette: Sequence[int] | None = None, | ||
surface: "tempe.surface.Surface | None" = None, | ||
clip: rectangle | None = None, | ||
): ... | ||
|
||
def update( | ||
self, | ||
geometry: Iterable[point] | None = None, | ||
buffers: Iterable[framebuf.FrameBuffer] | None = None, | ||
**kwargs: Any, | ||
): ... | ||
|
||
def __iter__(self) -> tuple[point, framebuf.FrameBuffer]: ... | ||
|
||
|
||
class ColoredBitmaps(ColoredGeometry[point]): | ||
"""Draw 1-bit framebuffers bitmaps at points in given colors.""" | ||
|
||
def __init__( | ||
self, | ||
geometry: Iterable[point], | ||
colors: Iterable[int], | ||
buffers: Iterable[framebuf.FrameBuffer], | ||
*, | ||
surface: "tempe.surface.Surface | None" = None, | ||
clip: rectangle | None = None, | ||
): ... | ||
|
||
def update( | ||
self, | ||
geometry: Iterable[point] | None = None, | ||
colors: Iterable[int] | None = None, | ||
buffers: Iterable[framebuf.FrameBuffer] | None = None, | ||
**kwargs: Any, | ||
): ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.