Skip to content

Commit 202356a

Browse files
committed
Base class for mypy
1 parent 9c2fb94 commit 202356a

File tree

8 files changed

+464
-407
lines changed

8 files changed

+464
-407
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [0.5.0] - 2025-08-30
5+
## [0.5.1] - 2025-08-31
6+
7+
### Changed
8+
9+
- Created a base class based on AirOS8 for both v6 and v8 to consume increasing mypy options for consumption
10+
11+
## [0.5.0] - Not released
612

713
Initial support for firmware 6
814

airos/airos6.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,35 @@
55
import logging
66
from typing import Any
77

8-
from .airos8 import AirOS
8+
from aiohttp import ClientSession
9+
10+
from .base import AirOS
911
from .data import AirOS6Data, DerivedWirelessRole
1012
from .exceptions import AirOSNotSupportedError
1113

1214
_LOGGER = logging.getLogger(__name__)
1315

1416

15-
class AirOS6(AirOS):
17+
class AirOS6(AirOS[AirOS6Data]):
1618
"""AirOS 6 connection class."""
1719

18-
data_model = AirOS6Data
20+
def __init__(
21+
self,
22+
host: str,
23+
username: str,
24+
password: str,
25+
session: ClientSession,
26+
use_ssl: bool = True,
27+
) -> None:
28+
"""Initialize AirOS8 class."""
29+
super().__init__(
30+
data_model=AirOS6Data,
31+
host=host,
32+
username=username,
33+
password=password,
34+
session=session,
35+
use_ssl=use_ssl,
36+
)
1937

2038
@staticmethod
2139
def derived_wireless_data(

0 commit comments

Comments
 (0)