Conversation
📝 WalkthroughWalkthroughThis pull request adds a new 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
comfy_api/latest/_io.py (1)
1242-1242:Type = listis unnecessarily broad — considerlist[list[float]].Every other concrete widget type carries a precise type hint (
bool,int,str,torch.Tensor, etc.).listgives callers zero guidance. The PR description says the value is a list of[x, y]float pairs, solist[list[float]]accurately captures that.(
list[float, float]is not valid Python generic syntax; for a fixed-length pair,tuple[float, float]would be canonical, but since the wire format uses JSON arrays,list[float]per element is the correct choice here.)✏️ Proposed fix
- Type = list + Type = list[list[float]]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@comfy_api/latest/_io.py` at line 1242, The Type alias currently set as "Type = list" is too vague; update the definition of the symbol "Type" to a nested list of floats (e.g. list[list[float]]) so callers know this widget carries an array of [x,y] float pairs; if the codebase targets older Python add the appropriate typing import (List) and use List[List[float]] instead of the bare built-in generics.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@comfy_api/latest/_io.py`:
- Line 1242: The Type alias currently set as "Type = list" is too vague; update
the definition of the symbol "Type" to a nested list of floats (e.g.
list[list[float]]) so callers know this widget carries an array of [x,y] float
pairs; if the codebase targets older Python add the appropriate typing import
(List) and use List[List[float]] instead of the bare built-in generics.
add curve type, FE change(curve editor) is Comfy-Org/ComfyUI_frontend#8860
curve is a list[list[float, float]] — sorted by x, both x and y in [0, 1].
UI would be
2026-02-22.15-14-23.mp4
Curve Editor would be used in Color Curve Node
