mirror of
https://github.com/esphome/esphome.git
synced 2024-12-02 13:24:15 +01:00
Black. flake8, pylint, and clang-format fixes
This commit is contained in:
parent
631a969107
commit
93432b85b9
@ -18,7 +18,9 @@ display::Rect DisplayRenderingPanel::measure_item_internal(display::Display *dis
|
|||||||
return display::Rect(0, 0, this->width_, this->height_);
|
return display::Rect(0, 0, this->width_, this->height_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayRenderingPanel::render_internal(display::Display *display, display::Rect bounds) { this->lambda_(*display); }
|
void DisplayRenderingPanel::render_internal(display::Display *display, display::Rect bounds) {
|
||||||
|
this->lambda_(*display);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace graphical_layout
|
} // namespace graphical_layout
|
||||||
} // namespace esphome
|
} // namespace esphome
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
import esphome.config_validation as cv
|
import esphome.config_validation as cv
|
||||||
from esphome.const import CONF_ID, CONF_WIDTH, CONF_HEIGHT, CONF_LAMBDA
|
from esphome.const import CONF_WIDTH, CONF_HEIGHT, CONF_LAMBDA
|
||||||
from esphome.components.display import DisplayRef
|
from esphome.components.display import DisplayRef
|
||||||
|
|
||||||
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
||||||
|
@ -11,7 +11,7 @@ static const char *const TAG = "horizontalstack";
|
|||||||
|
|
||||||
void HorizontalStack::dump_config(int indent_depth, int additional_level_depth) {
|
void HorizontalStack::dump_config(int indent_depth, int additional_level_depth) {
|
||||||
ESP_LOGCONFIG(TAG, "%*sItem Padding: %i", indent_depth, "", this->item_padding_);
|
ESP_LOGCONFIG(TAG, "%*sItem Padding: %i", indent_depth, "", this->item_padding_);
|
||||||
ESP_LOGCONFIG(TAG, "%*sChild alignment: %i", indent_depth, "", (int)this->child_align_);
|
ESP_LOGCONFIG(TAG, "%*sChild alignment: %i", indent_depth, "", (int) this->child_align_);
|
||||||
ESP_LOGCONFIG(TAG, "%*sChildren: %i", indent_depth, "", this->children_.size());
|
ESP_LOGCONFIG(TAG, "%*sChildren: %i", indent_depth, "", this->children_.size());
|
||||||
|
|
||||||
for (LayoutItem *child : this->children_) {
|
for (LayoutItem *child : this->children_) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
import esphome.config_validation as cv
|
import esphome.config_validation as cv
|
||||||
from esphome.const import CONF_ID, CONF_TYPE
|
from esphome.const import CONF_TYPE
|
||||||
|
|
||||||
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
||||||
HorizontalStack = graphical_layout_ns.class_("HorizontalStack")
|
HorizontalStack = graphical_layout_ns.class_("HorizontalStack")
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
import esphome.config_validation as cv
|
import esphome.config_validation as cv
|
||||||
from esphome.components import font, color
|
from esphome.components import font, color
|
||||||
from esphome.const import CONF_ID
|
|
||||||
|
|
||||||
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
||||||
TextPanel = graphical_layout_ns.class_("TextPanel")
|
TextPanel = graphical_layout_ns.class_("TextPanel")
|
||||||
|
@ -11,7 +11,7 @@ static const char *const TAG = "verticalstack";
|
|||||||
|
|
||||||
void VerticalStack::dump_config(int indent_depth, int additional_level_depth) {
|
void VerticalStack::dump_config(int indent_depth, int additional_level_depth) {
|
||||||
ESP_LOGCONFIG(TAG, "%*sItem Padding: %i", indent_depth, "", this->item_padding_);
|
ESP_LOGCONFIG(TAG, "%*sItem Padding: %i", indent_depth, "", this->item_padding_);
|
||||||
ESP_LOGCONFIG(TAG, "%*sChild alignment: %i", indent_depth, "", (int)this->child_align_);
|
ESP_LOGCONFIG(TAG, "%*sChild alignment: %i", indent_depth, "", (int) this->child_align_);
|
||||||
ESP_LOGCONFIG(TAG, "%*sChildren: %i", indent_depth, "", this->children_.size());
|
ESP_LOGCONFIG(TAG, "%*sChildren: %i", indent_depth, "", this->children_.size());
|
||||||
|
|
||||||
for (LayoutItem *child : this->children_) {
|
for (LayoutItem *child : this->children_) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
import esphome.config_validation as cv
|
import esphome.config_validation as cv
|
||||||
from esphome.const import CONF_ID, CONF_TYPE
|
from esphome.const import CONF_TYPE
|
||||||
|
|
||||||
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
graphical_layout_ns = cg.esphome_ns.namespace("graphical_layout")
|
||||||
VerticalStack = graphical_layout_ns.class_("VerticalStack")
|
VerticalStack = graphical_layout_ns.class_("VerticalStack")
|
||||||
@ -18,6 +18,7 @@ HORIZONTAL_CHILD_ALIGN = {
|
|||||||
"STRETCH_TO_FIT_WIDTH": HorizontalChildAlign.STRETCH_TO_FIT_WIDTH,
|
"STRETCH_TO_FIT_WIDTH": HorizontalChildAlign.STRETCH_TO_FIT_WIDTH,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def get_config_schema(base_item_schema, item_type_schema):
|
def get_config_schema(base_item_schema, item_type_schema):
|
||||||
return base_item_schema.extend(
|
return base_item_schema.extend(
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user