MCPcopy Create free account
hub / github.com/dialect-app/dialect / first_exclude

Function first_exclude

dialect/utils.py:18–26  ·  view source on GitHub ↗

Get the first item that is not excluded. Args: list_: List of items exclude: Item to ignore

(list_: list[str], exclude: str)

Source from the content-addressed store, hash-verified

16
17
18def first_exclude(list_: list[str], exclude: str) -> str | None:
19 """
20 Get the first item that is not excluded.
21
22 Args:
23 list_: List of items
24 exclude: Item to ignore
25 """
26 return next((x for x in list_ if x != exclude), None)

Callers 2

_on_src_lang_changedMethod · 0.90
_on_dest_lang_changedMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected