1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Simplify unnecessary re match.groups()[0] calls (#147909)

This commit is contained in:
Ville Skyttä
2025-07-02 12:12:26 +00:00
committed by GitHub
parent f10fcde6d8
commit ff76017ba6
4 changed files with 5 additions and 5 deletions

View File

@@ -98,7 +98,7 @@ def find_references(
continue
if match := re.match(RE_REFERENCE, value):
found.append({"source": f"{prefix}::{key}", "ref": match.groups()[0]})
found.append({"source": f"{prefix}::{key}", "ref": match.group(1)})
def removed_title_validator(
@@ -570,7 +570,7 @@ def validate_translation_file(
"translations",
"Lokalise supports only one level of references: "
f'"{reference["source"]}" should point to directly '
f'to "{match.groups()[0]}"',
f'to "{match.group(1)}"',
)