diff --git a/conf/apps/deep/arbitrary/path/statemachine.py b/conf/apps/deep/arbitrary/path/statemachine.py index 3de8f95..31979d8 100644 --- a/conf/apps/deep/arbitrary/path/statemachine.py +++ b/conf/apps/deep/arbitrary/path/statemachine.py @@ -4,5 +4,4 @@ logger = logging.getLogger('AppDaemon.Perimeter') logger.info('Imported statemachine') -class StateMachine: - ... +class StateMachine: ... diff --git a/conf/apps/deep/arbitrary/rules.py b/conf/apps/deep/arbitrary/rules.py index 0500850..1769df4 100644 --- a/conf/apps/deep/arbitrary/rules.py +++ b/conf/apps/deep/arbitrary/rules.py @@ -5,8 +5,8 @@ from dataclasses import dataclass class Rule1: state: str + @dataclass class Rule2: value: int - other: str = "default" # test changing this - + other: str = 'default' # test changing this diff --git a/conf/apps/family/grand_parent.py b/conf/apps/family/grand_parent.py index 1c9f38f..80d0961 100644 --- a/conf/apps/family/grand_parent.py +++ b/conf/apps/family/grand_parent.py @@ -2,5 +2,5 @@ from appdaemon.adapi import ADAPI class GrandParent(ADAPI): - def initialize(self): + def initialize(self) -> None: self.log(f'{self.__class__.__name__} Initialized') diff --git a/conf/apps/family/parent.py b/conf/apps/family/parent.py index 1ec5bf3..139439a 100644 --- a/conf/apps/family/parent.py +++ b/conf/apps/family/parent.py @@ -2,5 +2,5 @@ from appdaemon.adapi import ADAPI class Parent(ADAPI): - def initialize(self): + def initialize(self) -> None: self.log(f'{self.__class__.__name__} Initialized') diff --git a/conf/apps/family/sibling.py b/conf/apps/family/sibling.py index 98bb90a..e52e3c7 100644 --- a/conf/apps/family/sibling.py +++ b/conf/apps/family/sibling.py @@ -1,7 +1,6 @@ - from child import Child class Sibling(Child): - def initialize(self): + def initialize(self) -> None: self.log(f'{self.__class__.__name__} Initialized') diff --git a/conf/apps/food-repo/src/food/menu.py b/conf/apps/food-repo/src/food/menu.py index 4ff5997..d91512e 100644 --- a/conf/apps/food-repo/src/food/menu.py +++ b/conf/apps/food-repo/src/food/menu.py @@ -1,5 +1,4 @@ from dataclasses import dataclass, field -from typing import List from .base import FoodItem from .eggs import Eggs @@ -12,7 +11,7 @@ class GreenEggs(Eggs): @dataclass class Menu: - dishes: List[type[FoodItem]] = field(init=False) + dishes: list[type[FoodItem]] = field(init=False) def __post_init__(self): self.dishes = [GreenEggs, Ham] diff --git a/conf/apps/food-repo/src/food/utils.py b/conf/apps/food-repo/src/food/utils.py index 85301fd..6d8fbcf 100644 --- a/conf/apps/food-repo/src/food/utils.py +++ b/conf/apps/food-repo/src/food/utils.py @@ -13,4 +13,5 @@ class Utensil(Enum): POT = auto() PAN = auto() + GLOBAL_VAR = Utensil.FORK diff --git a/conf/apps/food-repo/src/restaurant/__init__.py b/conf/apps/food-repo/src/restaurant/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/conf/apps/food-repo/src/restaurant/restaurant.py b/conf/apps/food-repo/src/restaurant/restaurant.py index 0fb0d2b..9b08bc5 100644 --- a/conf/apps/food-repo/src/restaurant/restaurant.py +++ b/conf/apps/food-repo/src/restaurant/restaurant.py @@ -5,7 +5,7 @@ from food.menu import Menu class Restaurant(ADAPI): menu: Menu - def initialize(self): + def initialize(self) -> None: self.log(f'{self.__class__.__name__} initialized') self.menu = Menu() diff --git a/conf/apps/globals/hal.py b/conf/apps/globals/hal.py index 735bdc4..1bd4175 100644 --- a/conf/apps/globals/hal.py +++ b/conf/apps/globals/hal.py @@ -3,8 +3,9 @@ from typing import Any logger = logging.getLogger('AppDaemon.Perimeter') + class HAL: - def __init__(self, *args: Any, **kwargs: Any): + def __init__(self, *args: Any, **kwargs: Any) -> None: self.args = args self.kwargs = kwargs logger.info('Logging from HAL') diff --git a/conf/apps/globals/utils.py b/conf/apps/globals/utils.py index 894e63b..4b221fd 100644 --- a/conf/apps/globals/utils.py +++ b/conf/apps/globals/utils.py @@ -1,8 +1,9 @@ CONSTANTS = { 'A': 1, 'B': 2, - 'C': 3 + 'C': 3, } + def utility_function(): return 123, 456