Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code-quality] Apply ruff linting suggestions to core #7207

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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