Deduplicate constants A-D (#105638)

This commit is contained in:
Joost Lekkerkerker 2023-12-13 14:21:44 +01:00 committed by GitHub
parent 02853a62f0
commit ac53b78a0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 91 additions and 101 deletions

View file

@ -15,6 +15,7 @@ from aiogithubapi.const import OAUTH_USER_LOGIN
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant, callback
from homeassistant.data_entry_flow import FlowResult
from homeassistant.helpers.aiohttp_client import (
@ -23,14 +24,7 @@ from homeassistant.helpers.aiohttp_client import (
)
import homeassistant.helpers.config_validation as cv
from .const import (
CLIENT_ID,
CONF_ACCESS_TOKEN,
CONF_REPOSITORIES,
DEFAULT_REPOSITORIES,
DOMAIN,
LOGGER,
)
from .const import CLIENT_ID, CONF_REPOSITORIES, DEFAULT_REPOSITORIES, DOMAIN, LOGGER
async def get_repositories(hass: HomeAssistant, access_token: str) -> list[str]:

View file

@ -13,7 +13,6 @@ CLIENT_ID = "1440cafcc86e3ea5d6a2"
DEFAULT_REPOSITORIES = ["home-assistant/core", "esphome/esphome"]
FALLBACK_UPDATE_INTERVAL = timedelta(hours=1, minutes=30)
CONF_ACCESS_TOKEN = "access_token"
CONF_REPOSITORIES = "repositories"

View file

@ -6,13 +6,14 @@ from typing import Any
from aiogithubapi import GitHubAPI, GitHubException
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.core import HomeAssistant
from homeassistant.helpers.aiohttp_client import (
SERVER_SOFTWARE,
async_get_clientsession,
)
from .const import CONF_ACCESS_TOKEN, DOMAIN
from .const import DOMAIN
from .coordinator import GitHubDataUpdateCoordinator