Skip to content

Commit

Permalink
fix tests, pin versions
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Feb 14, 2022
1 parent f8dce2d commit 3537e14
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 21 deletions.
9 changes: 6 additions & 3 deletions custom_components/mail_and_packages/diagnostics.py
Expand Up @@ -16,8 +16,9 @@

REDACT_KEYS = {CONF_PASSWORD, CONF_USERNAME}


async def async_get_config_entry_diagnostics(
hass: HomeAssistant, config_entry: ConfigEntry
hass: HomeAssistant, config_entry: ConfigEntry # pylint: disable=unused-argument
) -> dict[str, Any]:
"""Return diagnostics for a config entry."""
diag: dict[str, Any] = {}
Expand All @@ -26,8 +27,10 @@ async def async_get_config_entry_diagnostics(


async def async_get_device_diagnostics(
hass: HomeAssistant, config_entry: ConfigEntry, device: DeviceEntry
hass: HomeAssistant,
config_entry: ConfigEntry,
device: DeviceEntry, # pylint: disable=unused-argument
) -> dict[str, Any]:
"""Return diagnostics for a device."""
coordinator = hass.data[DOMAIN][config_entry.entry_id][COORDINATOR]
return coordinator.data
return coordinator.data
4 changes: 2 additions & 2 deletions requirements.txt
@@ -1,2 +1,2 @@
imageio
python-resize-image
imageio==2.16.0
python-resize-image==1.1.20
12 changes: 6 additions & 6 deletions requirements_format.txt
@@ -1,6 +1,6 @@
black
isort
flake8
pydocstyle
pylint
mypy
black==22.1.0
isort==5.10.1
flake8==4.0.1
pydocstyle==6.1.1
pylint==2.12.2
mypy==0.931
16 changes: 9 additions & 7 deletions requirements_test.txt
@@ -1,9 +1,11 @@
-r requirements.txt
av
pip>=21.0,<22.1
av==8.1.0
aiohttp_cors
aioresponses
black
isort
pytest
pytest-cov
pytest-homeassistant-custom-component
aioresponses==0.7.3
black==22.1.0
isort==5.10.1
pytest==7.0.1
pytest-cov==3.0.0
pytest-homeassistant-custom-component==0.6.12
homeassistant==2022.2.6
5 changes: 2 additions & 3 deletions tox.ini
@@ -1,18 +1,17 @@
[tox]
skipsdist = true
envlist = py38, py39, py310, lint, mypy
envlist = py39, py310, lint, mypy
skip_missing_interpreters = True
ignore_basepython_conflict = True

[gh-actions]
python =
3.8: py38, lint, mypy
3.9: py39, lint, mypy
3.10: py310

[testenv]
pip_version = pip>=21.0,<22.1
install_command = python -m pip install --use-deprecated legacy-resolver {opts} {packages}
install_command = python -m pip install {opts} {packages}
commands =
pytest --timeout=30 --cov=custom_components/mail_and_packages/ --cov-report=xml {posargs}
deps =
Expand Down

0 comments on commit 3537e14

Please sign in to comment.