Skip to content

Commit

Permalink
Fix a few typos (#3573)
Browse files Browse the repository at this point in the history
* Fix a few typos

* Fix a few typos

---------

Co-authored-by: Joakim Sørensen <[email protected]>
  • Loading branch information
emontnemery and ludeeus authored Apr 11, 2024
1 parent 13c1c4b commit aa23aab
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion custom_components/hacs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
# Clear out pending queue
hacs.queue.clear()

for task in hacs.recuring_tasks:
for task in hacs.recurring_tasks:
# Cancel all pending tasks
task()

Expand Down
26 changes: 13 additions & 13 deletions custom_components/hacs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
HacsRepositoryExistException,
HomeAssistantCoreRepositoryException,
)
from .repositories import RERPOSITORY_CLASSES
from .repositories import REPOSITORY_CLASSES
from .utils.decode import decode_content
from .utils.json import json_loads
from .utils.logger import LOGGER
Expand Down Expand Up @@ -375,7 +375,7 @@ def __init__(self) -> None:
self.configuration = HacsConfiguration()
self.core = HacsCore()
self.log = LOGGER
self.recuring_tasks: list[Callable[[], None]] = []
self.recurring_tasks: list[Callable[[], None]] = []
self.repositories = HacsRepositories()
self.status = HacsStatus()
self.system = HacsSystem()
Expand Down Expand Up @@ -555,7 +555,7 @@ async def async_register_repository(
):
raise AddonRepositoryException()

if category not in RERPOSITORY_CLASSES:
if category not in REPOSITORY_CLASSES:
self.log.warning(
"%s is not a valid repository category, %s will not be registered.",
category,
Expand All @@ -566,7 +566,7 @@ async def async_register_repository(
if (renamed := self.common.renamed_repositories.get(repository_full_name)) is not None:
repository_full_name = renamed

repository: HacsRepository = RERPOSITORY_CLASSES[category](self, repository_full_name)
repository: HacsRepository = REPOSITORY_CLASSES[category](self, repository_full_name)
if check:
try:
await repository.async_registration(ref)
Expand Down Expand Up @@ -629,49 +629,49 @@ async def startup_tasks(self, _=None) -> None:
break

if not self.configuration.experimental:
self.recuring_tasks.append(
self.recurring_tasks.append(
self.hass.helpers.event.async_track_time_interval(
self.async_update_downloaded_repositories, timedelta(hours=48)
)
)
self.recuring_tasks.append(
self.recurring_tasks.append(
self.hass.helpers.event.async_track_time_interval(
self.async_update_all_repositories,
timedelta(hours=96),
)
)
else:
self.recuring_tasks.append(
self.recurring_tasks.append(
self.hass.helpers.event.async_track_time_interval(
self.async_load_hacs_from_github,
timedelta(hours=48),
)
)

self.recuring_tasks.append(
self.recurring_tasks.append(
self.hass.helpers.event.async_track_time_interval(
self.async_update_downloaded_custom_repositories, timedelta(hours=48)
)
)

self.recuring_tasks.append(
self.recurring_tasks.append(
self.hass.helpers.event.async_track_time_interval(
self.async_get_all_category_repositories, timedelta(hours=6)
)
)

self.recuring_tasks.append(
self.recurring_tasks.append(
self.hass.helpers.event.async_track_time_interval(
self.async_check_rate_limit, timedelta(minutes=5)
)
)
self.recuring_tasks.append(
self.recurring_tasks.append(
self.hass.helpers.event.async_track_time_interval(
self.async_prosess_queue, timedelta(minutes=10)
)
)

self.recuring_tasks.append(
self.recurring_tasks.append(
self.hass.helpers.event.async_track_time_interval(
self.async_handle_critical_repositories, timedelta(hours=6)
)
Expand All @@ -683,7 +683,7 @@ async def startup_tasks(self, _=None) -> None:
if config_entry := self.configuration.config_entry:
config_entry.async_on_unload(unsub)

self.log.debug("There are %s scheduled recurring tasks", len(self.recuring_tasks))
self.log.debug("There are %s scheduled recurring tasks", len(self.recurring_tasks))

self.status.startup = False
self.async_dispatch(HacsDispatchEvent.STATUS, {})
Expand Down
2 changes: 1 addition & 1 deletion custom_components/hacs/repositories/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .template import HacsTemplateRepository
from .theme import HacsThemeRepository

RERPOSITORY_CLASSES: dict[HacsCategory, HacsRepository] = {
REPOSITORY_CLASSES: dict[HacsCategory, HacsRepository] = {
HacsCategory.THEME: HacsThemeRepository,
HacsCategory.INTEGRATION: HacsIntegrationRepository,
HacsCategory.PYTHON_SCRIPT: HacsPythonScriptRepository,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/hacs/websocket/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def hacs_repositories_clear_new(
connection: websocket_api.ActiveConnection,
msg: dict[str, Any],
) -> None:
"""Clear new repositories for spesific categories."""
"""Clear new repositories for specific categories."""
hacs: HacsBase = hass.data.get(DOMAIN)

if repo := msg.get("repository"):
Expand Down

0 comments on commit aa23aab

Please sign in to comment.