Update HACS
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,7 +8,7 @@ from homeassistant.util import json as json_util
|
||||
from ..base import HacsBase
|
||||
from ..enums import HacsDispatchEvent, HacsGitHubRepo
|
||||
from ..repositories.base import TOPIC_FILTER, HacsManifest, HacsRepository
|
||||
from .logger import get_hacs_logger
|
||||
from .logger import LOGGER
|
||||
from .path import is_safe
|
||||
from .store import async_load_from_store, async_save_to_store
|
||||
|
||||
@@ -54,7 +54,7 @@ class HacsData:
|
||||
|
||||
def __init__(self, hacs: HacsBase):
|
||||
"""Initialize."""
|
||||
self.logger = get_hacs_logger()
|
||||
self.logger = LOGGER
|
||||
self.hacs = hacs
|
||||
self.content = {}
|
||||
|
||||
@@ -210,7 +210,6 @@ class HacsData:
|
||||
) or repository_data.get("stars", 0)
|
||||
repository.releases.last_release = repository_data.get("last_release_tag")
|
||||
repository.data.releases = repository_data.get("releases", False)
|
||||
repository.data.hide = repository_data.get("hide", False)
|
||||
repository.data.installed = repository_data.get("installed", False)
|
||||
repository.data.new = repository_data.get("new", False)
|
||||
repository.data.selected_tag = repository_data.get("selected_tag")
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,9 +3,4 @@ import logging
|
||||
|
||||
from ..const import PACKAGE_NAME
|
||||
|
||||
_HACSLogger: logging.Logger = logging.getLogger(PACKAGE_NAME)
|
||||
|
||||
|
||||
def get_hacs_logger() -> logging.Logger:
|
||||
"""Return a Logger instance."""
|
||||
return _HACSLogger
|
||||
LOGGER: logging.Logger = logging.getLogger(PACKAGE_NAME)
|
||||
|
||||
@@ -8,9 +8,9 @@ from typing import Coroutine
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from ..exceptions import HacsExecutionStillInProgress
|
||||
from .logger import get_hacs_logger
|
||||
from .logger import LOGGER
|
||||
|
||||
_LOGGER = get_hacs_logger()
|
||||
_LOGGER = LOGGER
|
||||
|
||||
|
||||
class QueueManager:
|
||||
|
||||
@@ -5,9 +5,9 @@ from homeassistant.util import json as json_util
|
||||
|
||||
from ..const import VERSION_STORAGE
|
||||
from ..exceptions import HacsException
|
||||
from .logger import get_hacs_logger
|
||||
from .logger import LOGGER
|
||||
|
||||
_LOGGER = get_hacs_logger()
|
||||
_LOGGER = LOGGER
|
||||
|
||||
|
||||
class HACSStore(Store):
|
||||
|
||||
@@ -6,11 +6,15 @@ from typing import TYPE_CHECKING
|
||||
from jinja2 import Template
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..base import HacsBase
|
||||
from ..repositories.base import HacsRepository
|
||||
|
||||
|
||||
def render_template(content: str, context: HacsRepository) -> str:
|
||||
def render_template(hacs: HacsBase, content: str, context: HacsRepository) -> str:
|
||||
"""Render templates in content."""
|
||||
if hacs.configuration.experimental:
|
||||
# Do not render for experimental
|
||||
return content
|
||||
# Fix None issues
|
||||
if context.releases.last_release_object is not None:
|
||||
prerelease = context.releases.last_release_object.prerelease
|
||||
|
||||
Reference in New Issue
Block a user