Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Jan 20, 2026

Fixes #355

PR #349 changed Optional[bool] type hints to bool | None syntax, but typer < 0.12.4 does not support PEP 604 union types, causing RuntimeError: Type not yet supported: bool | None.

Changes:

  • Update typer dependency from >=0.9 to >=0.12.4 (adds PEP 604 support via typer#548)
  • Remove deprecated is_flag parameter from typer.Option() calls (deprecated in typer 0.15.0, never worked properly)

Testing:

  • All unit tests pass
  • CLI works with typer 0.12.4 (minimum) and 0.21.1 (latest)
  • No breaking changes - existing click<=8.1.8 pin is compatible with typer 0.12.4+

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. dependencies Pull requests that update a dependency file labels Jan 20, 2026
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main     #356      +/-   ##
==========================================
- Coverage   51.93%   51.81%   -0.13%     
==========================================
  Files          32       32              
  Lines        3489     3563      +74     
==========================================
+ Hits         1812     1846      +34     
- Misses       1677     1717      +40     
Files with missing lines Coverage Δ
comfy_cli/cmdline.py 49.39% <ø> (ø)
comfy_cli/command/custom_nodes/command.py 43.19% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christian-byrne
Copy link
Contributor Author

The failing CI checks are unrelated to this PR's changes - they are e2e test failures caused by network timeouts downloading PyTorch from download.pytorch.org:

WARNING: Connection timed out while downloading.
× Download failed after 6 attempts because not enough bytes were received (5.2 MB/188.8 MB)
╰─> URL: https://download.pytorch.org/whl/cpu/torch-2.10.0+cpu-cp310-cp310-linux_x86_64.whl
note: This is an issue with network connectivity, not pip.

These are known flaky tests - the main branch also had the same failures on PR #351 ("Fix ComfyUI repo URLs").

The core unit tests (Run pytest) and code checks (ruff_check, build) all pass successfully.

Re-running the failed jobs...

PR Comfy-Org#349 changed type hints from Optional[bool] to bool | None syntax,
but typer < 0.12.4 doesn't support PEP 604 union types (X | None).
This caused RuntimeError when running comfy CLI with older typer.

Changes:
- Update typer dependency from >=0.9 to >=0.12.4
- Remove deprecated is_flag parameter from typer.Option() calls
  (is_flag was deprecated in typer 0.15.0 and never worked properly)

Fixes Comfy-Org#355

References:
- Typer PEP 604 support: fastapi/typer#548
- is_flag deprecation: fastapi/typer#986

Amp-Thread-ID: https://ampcode.com/threads/T-019bdd23-62ea-732f-9443-5705ebe27a3b
Co-authored-by: Amp <amp@ampcode.com>
@bigcat88
Copy link
Contributor

Closing in the favor of #357

@bigcat88 bigcat88 closed this Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR #349 breaks typer compatibility: RuntimeError with 'bool | None' type hints

2 participants