Skip to content

Commit cbaef8d

Browse files
committed
Version 3.1.4, fix type checks
1 parent b2783d8 commit cbaef8d

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

krita.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import sys
2-
import torch
3-
import numpy as np
42
from enum import Enum
53
from pathlib import Path
64
from typing import Any, NamedTuple
7-
from PIL import Image
85

9-
import server
106
import comfy.samplers
7+
import numpy as np
8+
import server
9+
import torch
1110
from comfy.comfy_types.node_typing import IO
1211
from comfy_api.latest import io
12+
from PIL import Image
13+
1314
from .nodes import SendImageWebSocket
1415

1516

@@ -102,7 +103,7 @@ def define_schema(cls):
102103
)
103104

104105
@classmethod
105-
def execute(
106+
def execute( # type: ignore
106107
cls,
107108
images: torch.Tensor,
108109
x: int = 0,
@@ -141,7 +142,7 @@ def define_schema(cls):
141142
)
142143

143144
@classmethod
144-
def execute(cls, value: Any, name: str, type: str):
145+
def execute(cls, value: Any, name: str, type: str): # type: ignore
145146
mime = {
146147
"text": "text/plain",
147148
"markdown": "text/markdown",
@@ -237,7 +238,7 @@ def define_schema(cls):
237238
)
238239

239240
@classmethod
240-
def execute(cls, name: str):
241+
def execute(cls, name: str): # type: ignore
241242
return io.NodeOutput(_placeholder_image(), torch.ones(1, 512, 512))
242243

243244

@@ -255,7 +256,7 @@ def define_schema(cls):
255256
)
256257

257258
@classmethod
258-
def execute(cls, name: str):
259+
def execute(cls, name: str): # type: ignore
259260
return io.NodeOutput(torch.ones(1, 512, 512))
260261

261262

@@ -290,7 +291,7 @@ def define_schema(cls):
290291
)
291292

292293
@classmethod
293-
def execute(cls, name: str, type: str, default, min=0.0, max=1.0):
294+
def execute(cls, name: str, type: str, default, min=0.0, max=1.0): # type: ignore
294295
if type == "number":
295296
return io.NodeOutput(float(default))
296297
elif type == "number (integer)":
@@ -327,7 +328,7 @@ def define_schema(cls):
327328
)
328329

329330
@classmethod
330-
def execute(cls, name: str, sampler_preset: str):
331+
def execute(cls, name: str, sampler_preset: str): # type: ignore
331332
raise NotImplementedError("This workflow must be started from Krita!")
332333

333334

@@ -359,5 +360,5 @@ def define_schema(cls):
359360
)
360361

361362
@classmethod
362-
def execute(cls, name: str, sampler_preset: str):
363+
def execute(cls, name: str, sampler_preset: str): # type: ignore
363364
raise NotImplementedError("This workflow must be started from Krita!")

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "comfyui-tooling-nodes"
33
description = "Provides nodes and server API extensions geared towards using ComfyUI as a backend for external tools."
4-
version = "3.1.3"
4+
version = "3.1.4"
55
license = { file = "LICENSE" }
66

77
[project.urls]
@@ -13,7 +13,7 @@ line-length = 100
1313
preview = true
1414

1515
[tool.ruff.lint]
16-
ignore = ["E741"]
16+
ignore = ["E741", "BLE001"]
1717

1818
[tool.black]
1919
line-length = 100

0 commit comments

Comments
 (0)