Add flake8 comprehensions checks to pre-commit & CI (#48111)
This commit is contained in:
parent
fa5ce70af1
commit
8a56dbf587
18 changed files with 27 additions and 29 deletions
|
@ -766,7 +766,7 @@ class MockConfigEntry(config_entries.ConfigEntry):
|
|||
def patch_yaml_files(files_dict, endswith=True):
|
||||
"""Patch load_yaml with a dictionary of yaml files."""
|
||||
# match using endswith, start search with longest string
|
||||
matchlist = sorted(list(files_dict.keys()), key=len) if endswith else []
|
||||
matchlist = sorted(files_dict.keys(), key=len) if endswith else []
|
||||
|
||||
def mock_open_f(fname, **_):
|
||||
"""Mock open() in the yaml module, used by load_yaml."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue