From a240b8615785b25c7e5631deb14c77e44389e797 Mon Sep 17 00:00:00 2001 From: Thomas Franks Date: Wed, 24 Aug 2022 11:25:35 -0400 Subject: [PATCH 1/6] resolves #13 Missing Type Annotations --- adafruit_ssd1327.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/adafruit_ssd1327.py b/adafruit_ssd1327.py index c18a570..59dc2ce 100644 --- a/adafruit_ssd1327.py +++ b/adafruit_ssd1327.py @@ -53,9 +53,14 @@ # pylint: disable=too-few-public-methods class SSD1327(displayio.Display): - """SSD1327 driver""" + """SSD1327 driver + kwargs: + param: height in pixels + param: width in pixels + param: optional rotation : 0 < rotation < 180 results in 90 degree rotation + """ - def __init__(self, bus, **kwargs): + def __init__(self, bus: displayio.I2CDisplay, **kwargs) -> None: # Patch the init sequence for 32 pixel high displays. init_sequence = bytearray(_INIT_SEQUENCE) height = kwargs["height"] From eaba4b07d831835f00700a7b932a495f0f7062d2 Mon Sep 17 00:00:00 2001 From: Thomas Franks Date: Thu, 25 Aug 2022 16:24:20 -0400 Subject: [PATCH 2/6] resolves #13 Missing Type Annotations --- adafruit_ssd1327.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adafruit_ssd1327.py b/adafruit_ssd1327.py index 59dc2ce..aaf25b0 100644 --- a/adafruit_ssd1327.py +++ b/adafruit_ssd1327.py @@ -54,10 +54,10 @@ # pylint: disable=too-few-public-methods class SSD1327(displayio.Display): """SSD1327 driver - kwargs: - param: height in pixels - param: width in pixels - param: optional rotation : 0 < rotation < 180 results in 90 degree rotation + + :param int height: height in pixels + :param int width: width in pixels + :param int rotation: rotation in degrees 0 < rotation < 180 results in 90 degree rotation """ def __init__(self, bus: displayio.I2CDisplay, **kwargs) -> None: From 3f62811e21282455e260f9479f42764a0f51c6c3 Mon Sep 17 00:00:00 2001 From: Thomas Franks Date: Thu, 25 Aug 2022 17:13:48 -0400 Subject: [PATCH 3/6] resolves #13 Missing Type Annotations --- adafruit_ssd1327.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/adafruit_ssd1327.py b/adafruit_ssd1327.py index aaf25b0..299d510 100644 --- a/adafruit_ssd1327.py +++ b/adafruit_ssd1327.py @@ -51,13 +51,22 @@ b"\xAF\x00" # DISPLAY_ON ) + # pylint: disable=too-few-public-methods class SSD1327(displayio.Display): """SSD1327 driver - :param int height: height in pixels - :param int width: width in pixels - :param int rotation: rotation in degrees 0 < rotation < 180 results in 90 degree rotation + :param ~displayio.I2CDisplay bus: I2C bus + :param \**kwargs: + See below + + :Keyword Arguments: + * *width* (``int``) -- + Display width + * *height* (``int``) -- + Display height + * *rotation* (``int``) -- + Display rotation """ def __init__(self, bus: displayio.I2CDisplay, **kwargs) -> None: From d4d231c684522f53aa0dfda38ee7f7350f720661 Mon Sep 17 00:00:00 2001 From: Thomas Franks Date: Thu, 25 Aug 2022 17:17:51 -0400 Subject: [PATCH 4/6] resolves #13 Missing Type Annotations --- adafruit_ssd1327.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adafruit_ssd1327.py b/adafruit_ssd1327.py index 299d510..cf27b44 100644 --- a/adafruit_ssd1327.py +++ b/adafruit_ssd1327.py @@ -54,9 +54,9 @@ # pylint: disable=too-few-public-methods class SSD1327(displayio.Display): - """SSD1327 driver + r"""SSD1327 driver - :param ~displayio.I2CDisplay bus: I2C bus + :param ~displayio.I2CDisplay bus: The data bus the display is on :param \**kwargs: See below From a0696419a5621765c5f5da705f437098756acee8 Mon Sep 17 00:00:00 2001 From: Thomas Franks Date: Fri, 26 Aug 2022 12:49:33 -0400 Subject: [PATCH 5/6] resolves #13 Missing Type Annotations --- adafruit_ssd1327.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/adafruit_ssd1327.py b/adafruit_ssd1327.py index cf27b44..fcfb71d 100644 --- a/adafruit_ssd1327.py +++ b/adafruit_ssd1327.py @@ -54,19 +54,13 @@ # pylint: disable=too-few-public-methods class SSD1327(displayio.Display): - r"""SSD1327 driver + """SSD1327 driver :param ~displayio.I2CDisplay bus: The data bus the display is on - :param \**kwargs: - See below - - :Keyword Arguments: - * *width* (``int``) -- - Display width - * *height* (``int``) -- - Display height - * *rotation* (``int``) -- - Display rotation + :param int height: (keyword-only) The height of the screen + :param int width: (keyword-only) The width of the screen + :param int rotation: (keyword-only) The rotation.orientation of the + screen, in degrees """ def __init__(self, bus: displayio.I2CDisplay, **kwargs) -> None: From 0142c76bcfc54899ae3ace1309b16ca74093cb25 Mon Sep 17 00:00:00 2001 From: Thomas Franks Date: Fri, 26 Aug 2022 19:55:06 -0400 Subject: [PATCH 6/6] resolves #13 Missing Type Annotations --- adafruit_ssd1327.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_ssd1327.py b/adafruit_ssd1327.py index fcfb71d..072b824 100644 --- a/adafruit_ssd1327.py +++ b/adafruit_ssd1327.py @@ -59,7 +59,7 @@ class SSD1327(displayio.Display): :param ~displayio.I2CDisplay bus: The data bus the display is on :param int height: (keyword-only) The height of the screen :param int width: (keyword-only) The width of the screen - :param int rotation: (keyword-only) The rotation.orientation of the + :param int rotation: (keyword-only) The rotation/orientation of the screen, in degrees """