Use literal string interpolation in integrations E-G (f-strings) (#26379)
This commit is contained in:
1 parent
6a24d893c8
commit
fa79ef1220
45 files changed
+87
-92
No files matched your search
@@ -26,9 +26,7 @@ class ChallengeNeeded(SmartHomeError):
|
||||
|
||||
def __init__(self, challenge_type):
|
||||
"""Initialize challenge needed error."""
|
||||
super().__init__(
|
||||
ERR_CHALLENGE_NEEDED, "Challenge needed: {}".format(challenge_type)
|
||||
)
|
||||
super().__init__(ERR_CHALLENGE_NEEDED, f"Challenge needed: {challenge_type}")
|
||||
self.challenge_type = challenge_type
|
||||
|
||||
def to_response(self):
|
||||
|
||||
@@ -212,7 +212,7 @@ class GoogleEntity:
|
||||
if not executed:
|
||||
raise SmartHomeError(
|
||||
ERR_FUNCTION_NOT_SUPPORTED,
|
||||
"Unable to execute {} for {}".format(command, self.state.entity_id),
|
||||
f"Unable to execute {command} for {self.state.entity_id}",
|
||||
)
|
||||
|
||||
@callback
|
||||
|
||||
Reference in new issue
Block a user