From b089f40c360af158c409f38e46b3e55c7c1de7ee Mon Sep 17 00:00:00 2001 From: foamyguy Date: Wed, 4 Jun 2025 10:00:20 -0500 Subject: [PATCH 1/5] update rtd.yml file Signed-off-by: foamyguy --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 88bca9f..255dafd 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,7 +12,7 @@ sphinx: configuration: docs/conf.py build: - os: ubuntu-20.04 + os: ubuntu-lts-latest tools: python: "3" From b413eaa2ffc18d274fc07e017e47053ac6fcd77a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 15 Sep 2025 10:53:47 -0700 Subject: [PATCH 2/5] Implement placeholder root_group property It throws an error on access to point to displayio --- adafruit_rgb_display/rgb.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/adafruit_rgb_display/rgb.py b/adafruit_rgb_display/rgb.py index 8cfa5c9..bbf93bb 100644 --- a/adafruit_rgb_display/rgb.py +++ b/adafruit_rgb_display/rgb.py @@ -255,6 +255,16 @@ def rotation(self, val: int) -> None: raise ValueError("Rotation must be 0/90/180/270") self._rotation = val + @property + def root_group(self) -> None: + """Placeholder attribute to catch displayio use""" + raise NotImplementedError("Please use a displayio driver for the display. This is the pixel-level driver.") + + @root_group.setter + def root_group(self, val) -> None: + raise NotImplementedError("Please use a displayio driver for the display. This is the pixel-level driver.") + + class DisplaySPI(Display): """Base class for SPI type devices""" From d1a842232955958b65820dabc2e5be1b6951e6d4 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 15 Sep 2025 11:16:10 -0700 Subject: [PATCH 3/5] ruff format --- adafruit_rgb_display/rgb.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/adafruit_rgb_display/rgb.py b/adafruit_rgb_display/rgb.py index bbf93bb..777e9eb 100644 --- a/adafruit_rgb_display/rgb.py +++ b/adafruit_rgb_display/rgb.py @@ -258,11 +258,15 @@ def rotation(self, val: int) -> None: @property def root_group(self) -> None: """Placeholder attribute to catch displayio use""" - raise NotImplementedError("Please use a displayio driver for the display. This is the pixel-level driver.") + raise NotImplementedError( + "Please use a displayio driver for the display. This is the pixel-level driver." + ) @root_group.setter def root_group(self, val) -> None: - raise NotImplementedError("Please use a displayio driver for the display. This is the pixel-level driver.") + raise NotImplementedError( + "Please use a displayio driver for the display. This is the pixel-level driver." + ) From 9b93d2284e2ba4149bb445add48f09409f244cbe Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 17 Sep 2025 10:38:38 -0700 Subject: [PATCH 4/5] Remove extra line --- adafruit_rgb_display/rgb.py | 1 - 1 file changed, 1 deletion(-) diff --git a/adafruit_rgb_display/rgb.py b/adafruit_rgb_display/rgb.py index 777e9eb..0227cce 100644 --- a/adafruit_rgb_display/rgb.py +++ b/adafruit_rgb_display/rgb.py @@ -267,7 +267,6 @@ def root_group(self, val) -> None: raise NotImplementedError( "Please use a displayio driver for the display. This is the pixel-level driver." ) - class DisplaySPI(Display): From 54a63d453d3527561333454d10633e68cb6260da Mon Sep 17 00:00:00 2001 From: foamyguy Date: Fri, 10 Oct 2025 16:18:40 -0500 Subject: [PATCH 5/5] remove deprecated ruff rule, workaround RTD theme property inline issue. Signed-off-by: foamyguy --- docs/_static/custom.css | 8 ++++++++ docs/conf.py | 3 +++ ruff.toml | 1 - 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 docs/_static/custom.css diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 0000000..d60cf4b --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,8 @@ +/* SPDX-FileCopyrightText: 2025 Sam Blenny + * SPDX-License-Identifier: MIT + */ + +/* Monkey patch the rtd theme to prevent horizontal stacking of short items + * see https://github.com/readthedocs/sphinx_rtd_theme/issues/1301 + */ +.py.property{display: block !important;} diff --git a/docs/conf.py b/docs/conf.py index 6ad6c55..6b33eca 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -104,6 +104,9 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] +# Include extra css to work around rtd theme glitches +html_css_files = ["custom.css"] + # The name of an image file (relative to this directory) to use as a favicon of # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. diff --git a/ruff.toml b/ruff.toml index 6818392..bd41569 100644 --- a/ruff.toml +++ b/ruff.toml @@ -17,7 +17,6 @@ extend-select = [ "PLC2401", # non-ascii-name "PLC2801", # unnecessary-dunder-call "PLC3002", # unnecessary-direct-lambda-call - "E999", # syntax-error "PLE0101", # return-in-init "F706", # return-outside-function "F704", # yield-outside-function