mirror of
https://github.com/esphome/esphome.git
synced 2025-10-14 07:43:48 +01:00
Bump pylint from 2.10.2 to 2.11.1 (#2334)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
@@ -624,8 +624,7 @@ class EsphomeCore:
|
||||
expression = statement(expression)
|
||||
if not isinstance(expression, Statement):
|
||||
raise ValueError(
|
||||
"Add '{}' must be expression or statement, not {}"
|
||||
"".format(expression, type(expression))
|
||||
f"Add '{expression}' must be expression or statement, not {type(expression)}"
|
||||
)
|
||||
|
||||
self.main_statements.append(expression)
|
||||
@@ -639,8 +638,7 @@ class EsphomeCore:
|
||||
expression = statement(expression)
|
||||
if not isinstance(expression, Statement):
|
||||
raise ValueError(
|
||||
"Add '{}' must be expression or statement, not {}"
|
||||
"".format(expression, type(expression))
|
||||
f"Add '{expression}' must be expression or statement, not {type(expression)}"
|
||||
)
|
||||
self.global_statements.append(expression)
|
||||
_LOGGER.debug("Adding global: %s", expression)
|
||||
@@ -649,8 +647,7 @@ class EsphomeCore:
|
||||
def add_library(self, library):
|
||||
if not isinstance(library, Library):
|
||||
raise ValueError(
|
||||
"Library {} must be instance of Library, not {}"
|
||||
"".format(library, type(library))
|
||||
f"Library {library} must be instance of Library, not {type(library)}"
|
||||
)
|
||||
for other in self.libraries[:]:
|
||||
if other.name != library.name or other.name is None or library.name is None:
|
||||
@@ -660,9 +657,8 @@ class EsphomeCore:
|
||||
# Other is using a/the same repository, takes precendence
|
||||
break
|
||||
raise ValueError(
|
||||
"Adding named Library with repository failed! Libraries {} and {} "
|
||||
f"Adding named Library with repository failed! Libraries {library} and {other} "
|
||||
"requested with conflicting repositories!"
|
||||
"".format(library, other)
|
||||
)
|
||||
|
||||
if library.repository is not None:
|
||||
@@ -681,9 +677,8 @@ class EsphomeCore:
|
||||
break
|
||||
|
||||
raise ValueError(
|
||||
"Version pinning failed! Libraries {} and {} "
|
||||
f"Version pinning failed! Libraries {library} and {other} "
|
||||
"requested with conflicting versions!"
|
||||
"".format(library, other)
|
||||
)
|
||||
else:
|
||||
_LOGGER.debug("Adding library: %s", library)
|
||||
@@ -702,8 +697,7 @@ class EsphomeCore:
|
||||
pass
|
||||
else:
|
||||
raise ValueError(
|
||||
"Define {} must be string or Define, not {}"
|
||||
"".format(define, type(define))
|
||||
f"Define {define} must be string or Define, not {type(define)}"
|
||||
)
|
||||
self.defines.add(define)
|
||||
_LOGGER.debug("Adding define: %s", define)
|
||||
|
Reference in New Issue
Block a user