Skip to content

Conversation

@bigcat88
Copy link
Contributor

@bigcat88 bigcat88 commented Dec 4, 2025

  1. Applied ruff check comfy_api_nodes --fix while temporarily setting the minimum Python version to 3.10 and adding the UP rule.

  2. Added validate_video_frame_count function from this PR

  3. Removed imports of V1 files, and replaced them by correct import from V3 schema.

  4. Additionally, finally, fixed the poll_op return typing:

    Updated poll_op extractor type hints from Callable[[M], ...] to Callable[[M | Any], ...]

    • Problem: IDEs (like PyCharm) or type-checkers were getting stuck in a circular inference loop between the response_model and the lambda arguments, causing the final return type of poll_op to be lost.
    • Solution: Adding Any creates a permissive union that allows the IDE/type-checkers to resolve M solely from response_model, restoring strict typing for the function result.
    • Alternative Considered: Idea of using Callable[..., ...] (Ellipsis) was rejected because, while it fixes the inference issue, it loses argument count validation and hides the API intent that the callback receives type M.

API Node PR Checklist

Scope

  • Is API Node Change (no)

Pricing & Billing

  • Need pricing update
  • No pricing update

If Need pricing update:

  • Metronome rate cards updated
  • Auto‑billing tests updated and passing

QA

  • QA done
  • QA not required

Comms

  • Informed Kosinkadink

@bigcat88
Copy link
Contributor Author

bigcat88 commented Dec 4, 2025

+label: Core

@comfy-pr-bot comfy-pr-bot added the Core Core team dependency label Dec 4, 2025
Copy link
Member

@Kosinkadink Kosinkadink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested locally on nano banano pro and wan 2.5 txt2video nodes, all seems to work. merging

@Kosinkadink Kosinkadink merged commit 3c84562 into Comfy-Org:master Dec 4, 2025
13 checks passed
@bigcat88 bigcat88 deleted the chore/api-nodes/pyupgrade-py310 branch December 6, 2025 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core Core team dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants