mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 07:25:52 -05:00
Allow github requirements specs in hassfest for non-core integrations (#124925)
* allow all requirements specs * remove unnecessary tests * Revert "remove unnecessary tests" This reverts commit0a2af0318d. * Revert "allow all requirements specs" This reverts commitd15cd27f7b. * be lenient only for custom integrations * don't allow blanks as requested --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
co-authored by
Martin Hjelmare
parent
3d43c22485
commit
72065768f3
@@ -84,18 +84,19 @@ def validate_requirements_format(integration: Integration) -> bool:
|
||||
if not version:
|
||||
continue
|
||||
|
||||
for part in version.split(";", 1)[0].split(","):
|
||||
version_part = PIP_VERSION_RANGE_SEPARATOR.match(part)
|
||||
if (
|
||||
version_part
|
||||
and AwesomeVersion(version_part.group(2)).strategy
|
||||
== AwesomeVersionStrategy.UNKNOWN
|
||||
):
|
||||
integration.add_error(
|
||||
"requirements",
|
||||
f"Unable to parse package version ({version}) for {pkg}.",
|
||||
)
|
||||
continue
|
||||
if integration.core:
|
||||
for part in version.split(";", 1)[0].split(","):
|
||||
version_part = PIP_VERSION_RANGE_SEPARATOR.match(part)
|
||||
if (
|
||||
version_part
|
||||
and AwesomeVersion(version_part.group(2)).strategy
|
||||
== AwesomeVersionStrategy.UNKNOWN
|
||||
):
|
||||
integration.add_error(
|
||||
"requirements",
|
||||
f"Unable to parse package version ({version}) for {pkg}.",
|
||||
)
|
||||
continue
|
||||
|
||||
return len(integration.errors) == start_errors
|
||||
|
||||
|
||||
Reference in New Issue
Block a user