lint
This commit is contained in:
1 parent
2918191541
commit
00c234541d
5 files changed
+23
-26
No files matched your search
+18
-15
@@ -1,20 +1,23 @@
|
||||
get_index # unused function (src/api/app.py:43)
|
||||
list_autos # unused function (src/api/routes/automations.py:13)
|
||||
insert_auto # unused function (src/api/routes/automations.py:28)
|
||||
update_auto # unused function (src/api/routes/automations.py:32)
|
||||
delete_auto # unused function (src/api/routes/automations.py:40)
|
||||
read_details # unused function (src/api/routes/details.py:11)
|
||||
get_index # unused function (src/api/app.py:41)
|
||||
list_autos # unused function (src/api/routes/automations.py:14)
|
||||
insert_auto # unused function (src/api/routes/automations.py:30)
|
||||
update_auto # unused function (src/api/routes/automations.py:35)
|
||||
delete_auto # unused function (src/api/routes/automations.py:45)
|
||||
read_details # unused function (src/api/routes/details.py:12)
|
||||
read_profile # unused function (src/api/routes/details.py:24)
|
||||
save_profile # unused function (src/api/routes/details.py:28)
|
||||
read_ping # unused function (src/api/routes/ping.py:10)
|
||||
websocket_endpoint # unused function (src/api/routes/socket.py:13)
|
||||
params # unused variable (src/api/types.py:16)
|
||||
total_items # unused variable (src/api/types.py:17)
|
||||
data # unused variable (src/api/types.py:18)
|
||||
trigger_variables # unused variable (src/automations/types.py:13)
|
||||
trigger # unused variable (src/automations/types.py:15)
|
||||
condition # unused variable (src/automations/types.py:16)
|
||||
action # unused variable (src/automations/types.py:17)
|
||||
_.to_json # unused method (src/automations/types.py:45)
|
||||
_.automation_tags # unused property (src/hass_config/loader.py:17)
|
||||
trigger_variables # unused variable (src/automations/types.py:38)
|
||||
trigger # unused variable (src/automations/types.py:40)
|
||||
condition # unused variable (src/automations/types.py:41)
|
||||
action # unused variable (src/automations/types.py:42)
|
||||
_.to_json # unused method (src/automations/types.py:70)
|
||||
_.automation_tags # unused property (src/hass_config/loader.py:28)
|
||||
json_dumps # unused function (src/json_serializer.py:5)
|
||||
SecretValue # unused class (src/yaml_serializer/__init__.py:40)
|
||||
EnvVar # unused class (src/yaml_serializer/__init__.py:78)
|
||||
theme # unused variable (src/user_profile.py:9)
|
||||
lang # unused variable (src/user_profile.py:10)
|
||||
SecretValue # unused class (src/yaml_serializer/__init__.py:48)
|
||||
EnvVar # unused class (src/yaml_serializer/__init__.py:186)
|
||||
@@ -1,5 +1,4 @@
|
||||
from src.api.app import make_app
|
||||
from src.automations.manager import AutomationManager
|
||||
from src.hass_config import find_hass_config
|
||||
|
||||
hass_config = find_hass_config()
|
||||
|
||||
@@ -13,10 +13,7 @@ from .errors import (
|
||||
DBError,
|
||||
InvalidAutomationFile,
|
||||
)
|
||||
from .loader import (
|
||||
get_base_automation_key,
|
||||
load_and_iter_automations,
|
||||
)
|
||||
from .loader import get_base_automation_key, load_and_iter_automations
|
||||
from .tags import TagManager
|
||||
from .types import Automation, ExtenededAutomation
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from src.hass_config import HassConfig
|
||||
from src.yaml_serializer import load_yaml, dump_yaml
|
||||
from src.yaml_serializer import dump_yaml, load_yaml
|
||||
|
||||
|
||||
class UserProfile(BaseModel):
|
||||
@@ -14,7 +15,7 @@ class UserProfile(BaseModel):
|
||||
path = hass_config.get_profile_path()
|
||||
if path.exists():
|
||||
with hass_config.get_profile_path().open("r") as fp:
|
||||
return cls(**load_yaml(fp, hass_config.root_path))
|
||||
return cls(**load_yaml(fp, hass_config.root_path)) # type: ignore
|
||||
else:
|
||||
return cls()
|
||||
|
||||
|
||||
@@ -3,10 +3,7 @@ from unittest import TestCase
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from src.api.app import make_app
|
||||
from tests.utils import (
|
||||
HA_CONFIG_EXAMPLE,
|
||||
get_example_automation_loader,
|
||||
)
|
||||
from tests.utils import HA_CONFIG_EXAMPLE, get_example_automation_loader
|
||||
|
||||
|
||||
class BaseTestCase(TestCase):
|
||||
|
||||
Reference in new issue
Block a user