Skip to content

Commit

Permalink
Fixes #4: use correct wildcard type for outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-byrne committed Jun 24, 2024
1 parent 87b71e8 commit bcab7e8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ temp.py
temp.*
*.mkv
test-env.sh
todo.md
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "python-interpreter-node"
description = "Python interpreter to embed scripts into workflows and debug custom nodes."
version = "1.2.2"
version = "1.2.3"
license = "LICENSE"
dependencies = ["Pillow>=10.3.0"]

Expand Down
34 changes: 20 additions & 14 deletions python_interpreter_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

from typing import Optional, List, Union, Any, Dict, Set

# From: https://github.com/pythongosssss/ComfyUI-Custom-Scripts
class AnyType(str):
def __ne__(self, __value: object) -> bool:
return False
# Our any instance wants to be a wildcard string
any = AnyType("*")

class PythonInterpreter:
@classmethod
Expand Down Expand Up @@ -80,20 +86,20 @@ def INPUT_TYPES(cls):
FUNCTION = "run"
OUTPUT_NODE = True
RETURN_TYPES = (
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
"*",
any,
any,
any,
any,
any,
any,
any,
any,
any,
any,
any,
any,
any,
any,
)
RETURN_NAMES = (
"image1",
Expand Down

0 comments on commit bcab7e8

Please sign in to comment.