Skip to content

Commit

Permalink
Fix doc building
Browse files Browse the repository at this point in the history
a non-default mock of displayio.Bitmap is provided for doc building
  • Loading branch information
jepler committed Jan 26, 2024
1 parent 3689a87 commit d68e862
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions adafruit_pycamera/ironbow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import displayio

ironbow_palette = displayio.Palette(256)
"""A palette often used to convert images to false color"""

# fmt: off
for i, pi in enumerate(
Expand Down
2 changes: 2 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
:members:
.. automodule:: adafruit_pycamera.imageprocessing
:members:
.. automodule:: adafruit_pycamera.ironbow
:members:
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import sys

sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("mock"))

# -- General configuration ------------------------------------------------

Expand All @@ -34,10 +35,10 @@
"adafruit_lis3dh",
"adafruit_ticks",
"bitmaptools",
"bitmapfilter",
"busdisplay",
"busio",
"digitalio",
"displayio",
"espcamera",
"fourwire",
"micropython",
Expand Down
11 changes: 11 additions & 0 deletions docs/mock/displayio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-FileCopyrightText: 2024 Jeff Epler for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense


class Palette:
def __init__(self, i):
self._data = [0] * i

def __setitem__(self, idx, value):
self._data[idx] = value

0 comments on commit d68e862

Please sign in to comment.