diff --git a/pyoverkiz/client.py b/pyoverkiz/client.py index 74d51583..bb905884 100644 --- a/pyoverkiz/client.py +++ b/pyoverkiz/client.py @@ -7,7 +7,7 @@ import urllib.parse from pathlib import Path from types import TracebackType -from typing import Any, cast +from typing import Any, Self, cast import backoff from aiohttp import ( @@ -216,7 +216,7 @@ def __init__( ssl_context=self._ssl, ) - async def __aenter__(self) -> OverkizClient: + async def __aenter__(self) -> Self: """Enter async context manager and return the client instance.""" return self diff --git a/pyoverkiz/models.py b/pyoverkiz/models.py index 8a33f319..b25fca50 100644 --- a/pyoverkiz/models.py +++ b/pyoverkiz/models.py @@ -1265,16 +1265,16 @@ class ValuePrototype: """Value prototype defining parameter/state value constraints.""" type: str - min_value: int | float | None = None - max_value: int | float | None = None + min_value: float | None = None + max_value: float | None = None enum_values: list[str] | None = None description: str | None = None def __init__( self, type: str, - min_value: int | float | None = None, - max_value: int | float | None = None, + min_value: float | None = None, + max_value: float | None = None, enum_values: list[str] | None = None, description: str | None = None, **_: Any, diff --git a/pyproject.toml b/pyproject.toml index 15ae4d59..63468641 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,6 +116,8 @@ select = [ "PIE", # eradicate "ERA", + # flake8-pyi + "PYI", ] ignore = [ "E501", # Line too long