Skip to content

Commit 452dfa3

Browse files
committed
minor pylint fixes to config_flow
1 parent d1f7b95 commit 452dfa3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

custom_components/pyscript/config_flow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ async def async_step_import(self, import_config: Dict[str, Any] = None) -> Dict[
4545

4646
# Update values for all keys, excluding `allow_all_imports` for entries
4747
# set up through the UI.
48-
for k, v in import_config.items():
49-
if entry.source == SOURCE_IMPORT or k != CONF_ALLOW_ALL_IMPORTS:
50-
updated_data[k] = v
48+
for key, val in import_config.items():
49+
if entry.source == SOURCE_IMPORT or key != CONF_ALLOW_ALL_IMPORTS:
50+
updated_data[key] = val
5151

5252
# Remove values for all keys in entry.data that are not in the imported config,
5353
# excluding `allow_all_imports` for entries set up through the UI.

tests/test_config_flow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ async def test_import_flow_update_user(hass):
152152
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
153153
assert result["reason"] == "updated_entry"
154154

155-
hass.config_entries.async_entries(DOMAIN)[0].data == {
155+
assert hass.config_entries.async_entries(DOMAIN)[0].data == {
156156
CONF_ALLOW_ALL_IMPORTS: True,
157157
"apps": {"test_app": {"param": 1}},
158158
}
@@ -173,4 +173,4 @@ async def test_import_flow_update_import(hass):
173173
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
174174
assert result["reason"] == "updated_entry"
175175

176-
hass.config_entries.async_entries(DOMAIN)[0].data == {"apps": {"test_app": {"param": 1}}}
176+
assert hass.config_entries.async_entries(DOMAIN)[0].data == {"apps": {"test_app": {"param": 1}}}

0 commit comments

Comments
 (0)