Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/bokeh/plotting/_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ def _process_sequence_literals(glyphclass: type[Glyph], kwargs: Attrs, source: C

def _split_feature_trait(ft: str) -> tuple[str, str | None]:
"""Feature is up to first '_'. Ex. 'line_color' => ['line', 'color']"""
parts = ft.split("_", 1)
return tuple(parts) if len(parts) == 2 else (ft[0], None)
idx = ft.find("_")
if idx == -1:
return (ft[0], None)
return (ft[:idx], ft[idx+1:])

def _is_visual(ft: str) -> bool:
"""Whether a feature trait name is visual"""
Expand Down