From 032d441590b1c7e6b634832bbf311779727f425a Mon Sep 17 00:00:00 2001 From: clydebarrow <2366188+clydebarrow@users.noreply.github.com> Date: Mon, 24 Feb 2025 06:04:25 +1100 Subject: [PATCH] Move comment to where pylint is happy. --- esphome/components/font/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/esphome/components/font/__init__.py b/esphome/components/font/__init__.py index 0309e30da6..20ad6607ae 100644 --- a/esphome/components/font/__init__.py +++ b/esphome/components/font/__init__.py @@ -147,11 +147,6 @@ def check_missing_glyphs(file, codepoints, warning: bool = False): def validate_font_config(config): - if config[CONF_FILE][CONF_TYPE] == TYPE_LOCAL_BITMAP and CONF_SIZE in config: - raise cv.Invalid( - "Size is not a valid option for bitmap fonts, which are inherently fixed size" - ) - """ Check for duplicate codepoints, then check that all requested codepoints actually have glyphs defined in the appropriate font file. @@ -209,6 +204,11 @@ def validate_font_config(config): if font.get_char_index(x) != 0 ] + if config[CONF_FILE][CONF_TYPE] == TYPE_LOCAL_BITMAP and CONF_SIZE in config: + raise cv.Invalid( + "Size is not a valid option for bitmap fonts, which are inherently fixed size" + ) + return config