Skip to content

Commit

Permalink
[code-quality] Apply ruff linting suggestions to core (#7207)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszduda23 authored Aug 7, 2024
1 parent 2a8424a commit 4b91ef5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions esphome/core/__init__.py
Original file line number Diff line number Diff line change
@@ -336,7 +336,7 @@ def __init__(self, id, is_declaration=False, type=None, is_manual=None):
else:
self.is_manual = is_manual
self.is_declaration = is_declaration
self.type: Optional["MockObjClass"] = type
self.type: Optional[MockObjClass] = type

def resolve(self, registered_ids):
from esphome.config_validation import RESERVED_IDS
@@ -500,25 +500,25 @@ def __init__(self):
# The relative path to where all build files are stored
self.build_path: Optional[str] = None
# The validated configuration, this is None until the config has been validated
self.config: Optional["ConfigType"] = None
self.config: Optional[ConfigType] = None
# The pending tasks in the task queue (mostly for C++ generation)
# This is a priority queue (with heapq)
# Each item is a tuple of form: (-priority, unique number, task)
self.event_loop = _FakeEventLoop()
# Task counter for pending tasks
self.task_counter = 0
# The variable cache, for each ID this holds a MockObj of the variable obj
self.variables: dict[str, "MockObj"] = {}
self.variables: dict[str, MockObj] = {}
# A list of statements that go in the main setup() block
self.main_statements: list["Statement"] = []
self.main_statements: list[Statement] = []
# A list of statements to insert in the global block (includes and global variables)
self.global_statements: list["Statement"] = []
self.global_statements: list[Statement] = []
# A set of platformio libraries to add to the project
self.libraries: list[Library] = []
# A set of build flags to set in the platformio project
self.build_flags: set[str] = set()
# A set of defines to set for the compile process in esphome/core/defines.h
self.defines: set["Define"] = set()
self.defines: set[Define] = set()
# A map of all platformio options to apply
self.platformio_options: dict[str, Union[str, list[str]]] = {}
# A set of strings of names of loaded integrations, used to find namespace ID conflicts

0 comments on commit 4b91ef5

Please sign in to comment.