maint: Bump HACS to 2.0.0
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from ..enums import HacsCategory
|
||||
from ..repositories.base import HacsRepository
|
||||
from .base import ActionValidationBase, ValidationException
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..repositories.base import HacsRepository
|
||||
|
||||
IGNORED = ["-shield", "img.shields.io", "buymeacoffee.com"]
|
||||
|
||||
|
||||
@@ -15,12 +19,12 @@ async def async_setup_validator(repository: HacsRepository) -> Validator:
|
||||
class Validator(ActionValidationBase):
|
||||
"""Validate the repository."""
|
||||
|
||||
categories = [HacsCategory.PLUGIN, HacsCategory.THEME]
|
||||
categories = (HacsCategory.PLUGIN, HacsCategory.THEME)
|
||||
more_info = "https://hacs.xyz/docs/publish/include#check-images"
|
||||
|
||||
async def async_validate(self):
|
||||
async def async_validate(self) -> None:
|
||||
"""Validate the repository."""
|
||||
info = await self.repository.async_get_info_file_contents()
|
||||
info = await self.repository.async_get_info_file_contents(version=self.repository.ref)
|
||||
for line in info.split("\n"):
|
||||
if "<img" in line or "![" in line:
|
||||
if [ignore for ignore in IGNORED if ignore in line]:
|
||||
|
||||
Reference in New Issue
Block a user