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

Enable more SIM ruff rules (#113015)

* SIM101 SIM103

* SIM107 SIM109

* SIM110

* SIM112 SIM113

* SIM115

* SIM116

* Fix

* Fix

* Fix
This commit is contained in:
Joost Lekkerkerker
2024-03-11 04:20:37 +01:00
committed by GitHub
parent e96ef4613c
commit cddce0ce0d
17 changed files with 41 additions and 70 deletions

View File

@@ -43,11 +43,9 @@ BAD_CORE_CONFIG = "homeassistant:\n unit_system: bad\n\n\n"
def log_ha_config(conf):
"""Log the returned config."""
cnt = 0
_LOGGER.debug("CONFIG - %s lines - %s errors", len(conf), len(conf.errors))
for key, val in conf.items():
_LOGGER.debug("#%s - %s: %s", cnt, key, val)
cnt += 1
for cnt, (key, val) in enumerate(conf.items()):
_LOGGER.debug("#%s - %s: %s", cnt + 1, key, val)
for cnt, err in enumerate(conf.errors):
_LOGGER.debug("error[%s] = %s", cnt, err)