Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 14 additions & 18 deletions linak_controller/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,17 @@ class Commands(str, Enum):
tcp_server = "tcp_server"


Config = TypedDict(
"Config",
mac_address=Optional[str],
base_height=Optional[int],
adapter_name=str,
scan_timeout=int,
connection_timeout=int,
server_address=str,
server_port=int,
favourites=dict,
forward=bool,
move_command_period=float,
)
class Config(TypedDict):
mac_address: Optional[str]
base_height: Optional[int]
adapter_name: str
scan_timeout: int
connection_timeout: int
server_address: str
server_port: int
favourites: dict
forward: bool
move_command_period: float

default_config = Config(
{
Expand All @@ -55,11 +53,9 @@ class Commands(str, Enum):
}
)

Command = TypedDict(
"Command",
key=Optional[Commands],
value=Optional[str],
)
class Command(TypedDict):
key: Optional[Commands]
value: Optional[str]


def get_config() -> tuple[Config, Command]:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ authors = ["Rhys Tyers"]
license = "MIT"

[tool.poetry.dependencies]
python = ">=3.8,<3.14"
python = ">=3.9"
aiohttp = "^3.8.4"
appdirs = "^1.4.4"
bleak = "^0.22.3"
bleak = "^1.1.1"
PyYAML = "^6.0"

[tool.poetry.scripts]
Expand Down