diff --git a/custom_components/gismeteo/__init__.py b/custom_components/gismeteo/__init__.py index 5aa9a48..0e1ad84 100644 --- a/custom_components/gismeteo/__init__.py +++ b/custom_components/gismeteo/__init__.py @@ -151,7 +151,7 @@ def _get(var: dict, ind: str, func: Optional[Callable] = None) -> Any: if func is not None: try: res = func(res) - except ValueError: + except (TypeError, ValueError, ArithmeticError): return None return res diff --git a/requirements-dev.txt b/requirements-dev.txt index 3ec4a93..34a8a8f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ -r requirements.txt black==20.08b1 flake8~=3.8 -mypy==0.782 +mypy==0.790 packaging~=20.4 pre-commit~=2.7 PyGithub~=1.53 diff --git a/requirements.txt b/requirements.txt index c38091d..af96343 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ geopy~=2.0 geohash2~=1.1 -voluptuous~=0.12 -homeassistant~=0.115 +voluptuous~=0.12.0 +homeassistant~=0.116.3