Introduce LabeledOption and RangeValues named types

Replace all tuple[str, str] annotations with purpose-specific names:
- LabeledOption = tuple[str, str] for (value, label) pairs used in
  FilterChoice, FilterSelect params, _modifier_options, _find_label,
  and _extract_labeled.
- RangeValues(min, max) NamedTuple for _parse_range return values,
  making the two fields self-documenting at every call site.

Export LabeledOption from common.components alongside SearchSelectOption.
Document the "name compound types explicitly" convention in CLAUDE.md.

https://claude.ai/code/session_01EyAJcMoDktLrY9tSbdHViA
This commit is contained in:
Claude
2026-06-08 18:53:37 +00:00
committed by Lukáš Kucharczyk
parent d9902146dc
commit 11cd62a3b9
4 changed files with 31 additions and 15 deletions
+2
View File
@@ -42,6 +42,7 @@ from common.components.primitives import (
)
from common.components.search_select import (
FilterSelect,
LabeledOption,
SearchSelect,
SearchSelectOption,
searchselect_selected,
@@ -87,6 +88,7 @@ __all__ = [
"PopoverTruncated",
"SearchField",
"FilterSelect",
"LabeledOption",
"SearchSelect",
"SearchSelectOption",
"searchselect_selected",