MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _unique_ints

Function _unique_ints

deployments/desktop/shared/agents.py:149–165  ·  view source on GitHub ↗
(values: Iterable[Any], *, minimum: int = 1, maximum: Optional[int] = None)

Source from the content-addressed store, hash-verified

147
148
149def _unique_ints(values: Iterable[Any], *, minimum: int = 1, maximum: Optional[int] = None) -> List[int]:
150 seen: Set[int] = set()
151 result: List[int] = []
152 for value in values or []:
153 try:
154 number = int(value)
155 except (TypeError, ValueError):
156 continue
157 if number < minimum:
158 continue
159 if maximum is not None and number > maximum:
160 continue
161 if number in seen:
162 continue
163 seen.add(number)
164 result.append(number)
165 return result
166
167
168def _string_list(values: Any) -> List[str]:

Callers 3

submit_gui_feedbackFunction · 0.85
create_reading_reportsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected