Deduplicate constants A-D (#105638)
This commit is contained in:
parent
02853a62f0
commit
ac53b78a0c
61 changed files with 91 additions and 101 deletions
|
@ -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]:
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue