mirror of
https://github.com/esphome/esphome.git
synced 2025-10-22 19:53:46 +01:00
[ruff] Enable SIM rules and fix code simplification violations (#9872)
This commit is contained in:
@@ -56,9 +56,12 @@ class ESPHomeDataBase:
|
||||
def from_node(self, node):
|
||||
# pylint: disable=attribute-defined-outside-init
|
||||
self._esp_range = DocumentRange.from_marks(node.start_mark, node.end_mark)
|
||||
if isinstance(node, yaml.ScalarNode):
|
||||
if node.style is not None and node.style in "|>":
|
||||
self._content_offset = 1
|
||||
if (
|
||||
isinstance(node, yaml.ScalarNode)
|
||||
and node.style is not None
|
||||
and node.style in "|>"
|
||||
):
|
||||
self._content_offset = 1
|
||||
|
||||
def from_database(self, database):
|
||||
# pylint: disable=attribute-defined-outside-init
|
||||
|
Reference in New Issue
Block a user