1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add flake8 comprehensions checks to pre-commit & CI (#48111)

This commit is contained in:
Franck Nijhof
2021-03-19 13:41:09 +01:00
committed by GitHub
parent fa5ce70af1
commit 8a56dbf587
18 changed files with 27 additions and 29 deletions

View File

@@ -17,7 +17,7 @@ def test_json_encoder(hass):
# Test serializing a set()
data = {"milk", "beer"}
assert sorted(ha_json_enc.default(data)) == sorted(list(data))
assert sorted(ha_json_enc.default(data)) == sorted(data)
# Test serializing an object which implements as_dict
assert ha_json_enc.default(state) == state.as_dict()