mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 14:43:51 +00:00
[ruff] Enable RET and fix all violations (#9929)
This commit is contained in:
@@ -18,11 +18,10 @@ def sort_dicts(obj):
|
||||
"""Recursively sort dictionaries for order-insensitive comparison."""
|
||||
if isinstance(obj, dict):
|
||||
return {k: sort_dicts(obj[k]) for k in sorted(obj)}
|
||||
elif isinstance(obj, list):
|
||||
if isinstance(obj, list):
|
||||
# Lists are not sorted; we preserve order
|
||||
return [sort_dicts(i) for i in obj]
|
||||
else:
|
||||
return obj
|
||||
return obj
|
||||
|
||||
|
||||
def dict_diff(a, b, path=""):
|
||||
|
||||
@@ -22,8 +22,7 @@ def _run_repl_test(input_data):
|
||||
call[0][0] for call in mock_stdout.write.call_args_list
|
||||
).strip()
|
||||
splitted_output = full_output.split("\n")
|
||||
remove_version = splitted_output[1:] # remove first entry with version info
|
||||
return remove_version
|
||||
return splitted_output[1:] # remove first entry with version info
|
||||
|
||||
|
||||
def _validate(file_path: str):
|
||||
|
||||
Reference in New Issue
Block a user