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

Callers 3

submit_gui_feedbackFunction · 0.85
create_reading_reportsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected