Skip to content
Open
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
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ name: Test
on: [push, pull_request]

jobs:
mypy:
name: mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: pip install mypy cryptography types-requests
- name: Run mypy
run: mypy pyfritzhome

tests:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
5 changes: 3 additions & 2 deletions pyfritzhome/devicetypes/fritzhomeentitybase.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The entity base class."""

# -*- coding: utf-8 -*-

from __future__ import print_function
Expand All @@ -16,8 +17,8 @@ class FritzhomeEntityBase(ABC):
"""The Fritzhome Entity class."""

_fritz = None
ain: str = None
_functionsbitmask = None
ain: str
_functionsbitmask: int = 0
supported_features = None

def __init__(self, fritz=None, node=None):
Expand Down
6 changes: 3 additions & 3 deletions pyfritzhome/fritzhome.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .errors import InvalidError, LoginError, NotLoggedInError
from .fritzhomedevice import FritzhomeDevice
from .fritzhomedevice import FritzhomeTemplate
from typing import Dict
from typing import Dict, Optional

_LOGGER = logging.getLogger(__name__)

Expand All @@ -26,8 +26,8 @@ class Fritzhome(object):

_sid = None
_session = None
_devices: Dict[str, FritzhomeDevice] = None
_templates: Dict[str, FritzhomeTemplate] = None
_devices: Optional[Dict[str, FritzhomeDevice]] = None
_templates: Optional[Dict[str, FritzhomeTemplate]] = None

def __init__(self, host, user, password, ssl_verify=True):
"""Create a fritzhome object."""
Expand Down