chore(api/core): apply ruff reformatting (#7624)
This commit is contained in:
parent
178730266d
commit
2cf1187b32
724 changed files with 21180 additions and 21123 deletions
|
|
@ -73,10 +73,10 @@ def pin_position_map(original_position_map: dict[str, int], pin_list: list[str])
|
|||
|
||||
|
||||
def is_filtered(
|
||||
include_set: set[str],
|
||||
exclude_set: set[str],
|
||||
data: Any,
|
||||
name_func: Callable[[Any], str],
|
||||
include_set: set[str],
|
||||
exclude_set: set[str],
|
||||
data: Any,
|
||||
name_func: Callable[[Any], str],
|
||||
) -> bool:
|
||||
"""
|
||||
Check if the object should be filtered out.
|
||||
|
|
@ -102,9 +102,9 @@ def is_filtered(
|
|||
|
||||
|
||||
def sort_by_position_map(
|
||||
position_map: dict[str, int],
|
||||
data: list[Any],
|
||||
name_func: Callable[[Any], str],
|
||||
position_map: dict[str, int],
|
||||
data: list[Any],
|
||||
name_func: Callable[[Any], str],
|
||||
) -> list[Any]:
|
||||
"""
|
||||
Sort the objects by the position map.
|
||||
|
|
@ -117,13 +117,13 @@ def sort_by_position_map(
|
|||
if not position_map or not data:
|
||||
return data
|
||||
|
||||
return sorted(data, key=lambda x: position_map.get(name_func(x), float('inf')))
|
||||
return sorted(data, key=lambda x: position_map.get(name_func(x), float("inf")))
|
||||
|
||||
|
||||
def sort_to_dict_by_position_map(
|
||||
position_map: dict[str, int],
|
||||
data: list[Any],
|
||||
name_func: Callable[[Any], str],
|
||||
position_map: dict[str, int],
|
||||
data: list[Any],
|
||||
name_func: Callable[[Any], str],
|
||||
) -> OrderedDict[str, Any]:
|
||||
"""
|
||||
Sort the objects into a ordered dict by the position map.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue