mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-12-31 18:17:46 +01:00
Bump black from 21.12b0 to 22.1.0 (#169)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
parent
fea4cb94c9
commit
1eebbfc1e0
@ -102,7 +102,7 @@ class ReconnectLogic(zeroconf.RecordUpdateListener):
|
||||
# a long time for their device to show up in HA again (this was
|
||||
# mentioned a lot in early feedback)
|
||||
tries = min(tries, 10) # prevent OverflowError
|
||||
wait_time = int(round(min(1.8 ** tries, 60.0)))
|
||||
wait_time = int(round(min(1.8**tries, 60.0)))
|
||||
if tries == 1:
|
||||
_LOGGER.info("Trying to reconnect to %s in the background", self._log_name)
|
||||
_LOGGER.debug("Retrying %s in %d seconds", self._log_name, wait_time)
|
||||
|
@ -1,5 +1,5 @@
|
||||
pylint==2.12.2
|
||||
black==21.12b0
|
||||
black==22.1.0
|
||||
flake8==4.0.1
|
||||
isort==5.10.1
|
||||
mypy==0.931
|
||||
|
@ -153,24 +153,18 @@ def test_api_model_base_to_dict():
|
||||
|
||||
def test_api_model_base_from_dict():
|
||||
assert DummyAPIModel.from_dict({}) == DummyAPIModel()
|
||||
assert (
|
||||
DummyAPIModel.from_dict(
|
||||
{
|
||||
"val1": -1,
|
||||
"val2": -1,
|
||||
}
|
||||
)
|
||||
== DummyAPIModel(val1=-1, val2=None)
|
||||
)
|
||||
assert (
|
||||
DummyAPIModel.from_dict(
|
||||
{
|
||||
"val1": -1,
|
||||
"unknown": 100,
|
||||
}
|
||||
)
|
||||
== DummyAPIModel(val1=-1)
|
||||
)
|
||||
assert DummyAPIModel.from_dict(
|
||||
{
|
||||
"val1": -1,
|
||||
"val2": -1,
|
||||
}
|
||||
) == DummyAPIModel(val1=-1, val2=None)
|
||||
assert DummyAPIModel.from_dict(
|
||||
{
|
||||
"val1": -1,
|
||||
"unknown": 100,
|
||||
}
|
||||
) == DummyAPIModel(val1=-1)
|
||||
assert ListAPIModel.from_dict({}) == ListAPIModel()
|
||||
assert ListAPIModel.from_dict({"val": []}) == ListAPIModel()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user