summaryrefslogtreecommitdiff
path: root/shared-bindings/displayio
diff options
context:
space:
mode:
authordherrada <dylan.herrada@adafruit.com>2020-07-03 14:23:34 -0400
committerdherrada <dylan.herrada@adafruit.com>2020-07-03 14:23:34 -0400
commitd0d949cd24dbff5fb382f8c7abf3bae7ba46541a (patch)
treea3e4f4faae1858acef2f9095a7bf9650fd8c000c /shared-bindings/displayio
parentd358c915c3d27469fc17bdc302dad393d7e28a09 (diff)
Made every init return None
Diffstat (limited to 'shared-bindings/displayio')
-rw-r--r--shared-bindings/displayio/Bitmap.c2
-rw-r--r--shared-bindings/displayio/ColorConverter.c2
-rw-r--r--shared-bindings/displayio/Display.c2
-rw-r--r--shared-bindings/displayio/EPaperDisplay.c2
-rw-r--r--shared-bindings/displayio/FourWire.c2
-rw-r--r--shared-bindings/displayio/Group.c2
-rw-r--r--shared-bindings/displayio/I2CDisplay.c2
-rw-r--r--shared-bindings/displayio/OnDiskBitmap.c2
-rw-r--r--shared-bindings/displayio/Palette.c2
-rw-r--r--shared-bindings/displayio/ParallelBus.c2
-rw-r--r--shared-bindings/displayio/Shape.c2
-rw-r--r--shared-bindings/displayio/TileGrid.c2
12 files changed, 12 insertions, 12 deletions
diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c
index 9677b51f6..b2cda2153 100644
--- a/shared-bindings/displayio/Bitmap.c
+++ b/shared-bindings/displayio/Bitmap.c
@@ -39,7 +39,7 @@
//| class Bitmap:
//| """Stores values of a certain size in a 2D array"""
//|
-//| def __init__(self, width: int, height: int, value_count: int):
+//| def __init__(self, width: int, height: int, value_count: int) -> None:
//| """Create a Bitmap object with the given fixed size. Each pixel stores a value that is used to
//| index into a corresponding palette. This enables differently colored sprites to share the
//| underlying Bitmap. value_count is used to minimize the memory used to store the Bitmap.
diff --git a/shared-bindings/displayio/ColorConverter.c b/shared-bindings/displayio/ColorConverter.c
index 6126c4194..17eed1a9b 100644
--- a/shared-bindings/displayio/ColorConverter.c
+++ b/shared-bindings/displayio/ColorConverter.c
@@ -39,7 +39,7 @@
//| class ColorConverter:
//| """Converts one color format to another."""
//|
-//| def __init__(self, *, dither: bool = False):
+//| def __init__(self, *, dither: bool = False) -> None:
//| """Create a ColorConverter object to convert color formats. Only supports RGB888 to RGB565
//| currently.
//| :param bool dither: Adds random noise to dither the output image"""
diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c
index e2e648876..8d5fa8718 100644
--- a/shared-bindings/displayio/Display.c
+++ b/shared-bindings/displayio/Display.c
@@ -49,7 +49,7 @@
//| Most people should not use this class directly. Use a specific display driver instead that will
//| contain the initialization sequence at minimum."""
//|
-//| def __init__(self, display_bus: displayio, init_sequence: buffer, *, width: int, height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, color_depth: int = 16, grayscale: bool = False, pixels_in_byte_share_row: bool = True, bytes_per_cell: int = 1, reverse_pixels_in_byte: bool = False, set_column_command: int = 0x2a, set_row_command: int = 0x2b, write_ram_command: int = 0x2c, set_vertical_scroll: int = 0, backlight_pin: Optional[microcontroller.Pin] = None, brightness_command: int = None, brightness: bool = 1.0, auto_brightness: bool = False, single_byte_bounds: bool = False, data_as_commands: bool = False, auto_refresh: bool = True, native_frames_per_second: int = 60):
+//| def __init__(self, display_bus: displayio, init_sequence: buffer, *, width: int, height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, color_depth: int = 16, grayscale: bool = False, pixels_in_byte_share_row: bool = True, bytes_per_cell: int = 1, reverse_pixels_in_byte: bool = False, set_column_command: int = 0x2a, set_row_command: int = 0x2b, write_ram_command: int = 0x2c, set_vertical_scroll: int = 0, backlight_pin: Optional[microcontroller.Pin] = None, brightness_command: int = None, brightness: bool = 1.0, auto_brightness: bool = False, single_byte_bounds: bool = False, data_as_commands: bool = False, auto_refresh: bool = True, native_frames_per_second: int = 60) -> None:
//| r"""Create a Display object on the given display bus (`displayio.FourWire` or `displayio.ParallelBus`).
//|
//| The ``init_sequence`` is bitpacked to minimize the ram impact. Every command begins with a
diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c
index b9f7dd9a1..21eaf14da 100644
--- a/shared-bindings/displayio/EPaperDisplay.c
+++ b/shared-bindings/displayio/EPaperDisplay.c
@@ -49,7 +49,7 @@
//| Most people should not use this class directly. Use a specific display driver instead that will
//| contain the startup and shutdown sequences at minimum."""
//|
-//| def __init__(self, display_bus: displayio, start_sequence: buffer, stop_sequence: buffer, *, width: int, height: int, ram_width: int, ram_height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, set_column_window_command: Optional[int] = None, set_row_window_command: Optional[int] = None, single_byte_bounds: bool = False, write_black_ram_command: int, black_bits_inverted: bool = False, write_color_ram_command: Optional[int] = None, color_bits_inverted: bool = False, highlight_color: int = 0x000000, refresh_display_command: int, refresh_time: float = 40, busy_pin: Optional[microcontroller.Pin] = None, busy_state: bool = True, seconds_per_frame: float = 180, always_toggle_chip_select: bool = False):
+//| def __init__(self, display_bus: displayio, start_sequence: buffer, stop_sequence: buffer, *, width: int, height: int, ram_width: int, ram_height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, set_column_window_command: Optional[int] = None, set_row_window_command: Optional[int] = None, single_byte_bounds: bool = False, write_black_ram_command: int, black_bits_inverted: bool = False, write_color_ram_command: Optional[int] = None, color_bits_inverted: bool = False, highlight_color: int = 0x000000, refresh_display_command: int, refresh_time: float = 40, busy_pin: Optional[microcontroller.Pin] = None, busy_state: bool = True, seconds_per_frame: float = 180, always_toggle_chip_select: bool = False) -> None:
//| """Create a EPaperDisplay object on the given display bus (`displayio.FourWire` or `displayio.ParallelBus`).
//|
//| The ``start_sequence`` and ``stop_sequence`` are bitpacked to minimize the ram impact. Every
diff --git a/shared-bindings/displayio/FourWire.c b/shared-bindings/displayio/FourWire.c
index 7e5324924..83d260c0f 100644
--- a/shared-bindings/displayio/FourWire.c
+++ b/shared-bindings/displayio/FourWire.c
@@ -42,7 +42,7 @@
//| """Manage updating a display over SPI four wire protocol in the background while Python code runs.
//| It doesn't handle display initialization."""
//|
-//| def __init__(self, spi_bus: busio.SPI, *, command: microcontroller.Pin, chip_select: microcontroller.Pin, reset: microcontroller.Pin = None, baudrate: int = 24000000, polarity: int = 0, phase: int = 0):
+//| def __init__(self, spi_bus: busio.SPI, *, command: microcontroller.Pin, chip_select: microcontroller.Pin, reset: microcontroller.Pin = None, baudrate: int = 24000000, polarity: int = 0, phase: int = 0) -> None:
//| """Create a FourWire object associated with the given pins.
//|
//| The SPI bus and pins are then in use by the display until `displayio.release_displays()` is
diff --git a/shared-bindings/displayio/Group.c b/shared-bindings/displayio/Group.c
index 9d12ca161..02915da64 100644
--- a/shared-bindings/displayio/Group.c
+++ b/shared-bindings/displayio/Group.c
@@ -38,7 +38,7 @@
//| class Group:
//| """Manage a group of sprites and groups and how they are inter-related."""
//|
-//| def __init__(self, *, max_size: int = 4, scale: int = 1, x: int = 0, y: int = 0):
+//| def __init__(self, *, max_size: int = 4, scale: int = 1, x: int = 0, y: int = 0) -> None:
//| """Create a Group of a given size and scale. Scale is in one dimension. For example, scale=2
//| leads to a layer's pixel being 2x2 pixels when in the group.
//|
diff --git a/shared-bindings/displayio/I2CDisplay.c b/shared-bindings/displayio/I2CDisplay.c
index 7c1827db3..c8b6702a1 100644
--- a/shared-bindings/displayio/I2CDisplay.c
+++ b/shared-bindings/displayio/I2CDisplay.c
@@ -42,7 +42,7 @@
//| """Manage updating a display over I2C in the background while Python code runs.
//| It doesn't handle display initialization."""
//|
-//| def __init__(self, i2c_bus: busio.I2C, *, device_address: int, reset: microcontroller.Pin = None):
+//| def __init__(self, i2c_bus: busio.I2C, *, device_address: int, reset: microcontroller.Pin = None) -> None:
//| """Create a I2CDisplay object associated with the given I2C bus and reset pin.
//|
//| The I2C bus and pins are then in use by the display until `displayio.release_displays()` is
diff --git a/shared-bindings/displayio/OnDiskBitmap.c b/shared-bindings/displayio/OnDiskBitmap.c
index 0c6ca761c..7e94a0401 100644
--- a/shared-bindings/displayio/OnDiskBitmap.c
+++ b/shared-bindings/displayio/OnDiskBitmap.c
@@ -69,7 +69,7 @@
//| while True:
//| pass"""
//|
-//| def __init__(self, file: file):
+//| def __init__(self, file: file) -> None:
//| """Create an OnDiskBitmap object with the given file.
//|
//| :param file file: The open bitmap file"""
diff --git a/shared-bindings/displayio/Palette.c b/shared-bindings/displayio/Palette.c
index a06dd38ff..5418133e1 100644
--- a/shared-bindings/displayio/Palette.c
+++ b/shared-bindings/displayio/Palette.c
@@ -46,7 +46,7 @@
//| """Map a pixel palette_index to a full color. Colors are transformed to the display's format internally to
//| save memory."""
//|
-//| def __init__(self, color_count: int):
+//| def __init__(self, color_count: int) -> None:
//| """Create a Palette object to store a set number of colors.
//|
//| :param int color_count: The number of colors in the Palette"""
diff --git a/shared-bindings/displayio/ParallelBus.c b/shared-bindings/displayio/ParallelBus.c
index 247ac5dd5..30c9d373c 100644
--- a/shared-bindings/displayio/ParallelBus.c
+++ b/shared-bindings/displayio/ParallelBus.c
@@ -42,7 +42,7 @@
//| protocol may be refered to as 8080-I Series Parallel Interface in datasheets. It doesn't handle
//| display initialization."""
//|
-//| def __init__(self, *, data0: microcontroller.Pin, command: microcontroller.Pin, chip_select: microcontroller.Pin, write: microcontroller.Pin, read: microcontroller.Pin, reset: microcontroller.Pin):
+//| def __init__(self, *, data0: microcontroller.Pin, command: microcontroller.Pin, chip_select: microcontroller.Pin, write: microcontroller.Pin, read: microcontroller.Pin, reset: microcontroller.Pin) -> None:
//| """Create a ParallelBus object associated with the given pins. The bus is inferred from data0
//| by implying the next 7 additional pins on a given GPIO port.
//|
diff --git a/shared-bindings/displayio/Shape.c b/shared-bindings/displayio/Shape.c
index 258ac4902..4d737ecae 100644
--- a/shared-bindings/displayio/Shape.c
+++ b/shared-bindings/displayio/Shape.c
@@ -37,7 +37,7 @@
//| class Shape:
//| """Represents a shape made by defining boundaries that may be mirrored."""
//|
-//| def __init__(self, width: int, height: int, *, mirror_x: bool = False, mirror_y: bool = False):
+//| def __init__(self, width: int, height: int, *, mirror_x: bool = False, mirror_y: bool = False) -> None:
//| """Create a Shape object with the given fixed size. Each pixel is one bit and is stored by the
//| column boundaries of the shape on each row. Each row's boundary defaults to the full row.
//|
diff --git a/shared-bindings/displayio/TileGrid.c b/shared-bindings/displayio/TileGrid.c
index d3ad0f0fc..348fcb448 100644
--- a/shared-bindings/displayio/TileGrid.c
+++ b/shared-bindings/displayio/TileGrid.c
@@ -48,7 +48,7 @@
//|
//| A single tile grid is also known as a Sprite."""
//|
-//| def __init__(self, bitmap: displayio.Bitmap, *, pixel_shader: displayio.Palette, width: int = 1, height: int = 1, tile_width: int = None, tile_height: int = None, default_tile: int = 0, x: int = 0, y: int = 0):
+//| def __init__(self, bitmap: displayio.Bitmap, *, pixel_shader: displayio.Palette, width: int = 1, height: int = 1, tile_width: int = None, tile_height: int = None, default_tile: int = 0, x: int = 0, y: int = 0) -> None:
//| """Create a TileGrid object. The bitmap is source for 2d pixels. The pixel_shader is used to
//| convert the value and its location to a display native pixel color. This may be a simple color
//| palette lookup, a gradient, a pattern or a color transformer.