mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 14:50:49 +08:00
Fix pylint issues
This commit is contained in:
parent
fd00368437
commit
ccdbd957ef
@ -1,2 +0,0 @@
|
||||
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --fast
|
||||
pause
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -39,8 +39,8 @@ jobs:
|
||||
- name: Lint for errors
|
||||
run: |
|
||||
source venv/bin/activate
|
||||
pylint --rcfile=.pylintrc comfy/
|
||||
pylint --rcfile=.pylintrc comfy_extras/
|
||||
pylint -j 8 --rcfile=.pylintrc comfy/
|
||||
pylint -j 8 --rcfile=.pylintrc comfy_extras/
|
||||
build_and_execute_linux:
|
||||
environment: "Testing"
|
||||
name: Installation, Unit and Workflow Tests for Linux
|
||||
|
||||
@ -15,7 +15,7 @@ supported_pt_extensions = _supported_pt_extensions
|
||||
|
||||
# todo: this should be initialized elsewhere
|
||||
if 'main.py' in sys.argv:
|
||||
base_path = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../.."))
|
||||
base_path = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../..")) # pylint: disable=used-before-assignment
|
||||
elif args.cwd is not None:
|
||||
if not os.path.exists(args.cwd):
|
||||
try:
|
||||
|
||||
@ -113,8 +113,8 @@ class SVGToImage(CustomNode):
|
||||
try:
|
||||
cleaned_svg = self.clean_svg_string(svg_string)
|
||||
|
||||
stream = skia.MemoryStream(cleaned_svg.encode('utf-8'), True)
|
||||
svg_dom = skia.SVGDOM.MakeFromStream(stream)
|
||||
stream = skia.MemoryStream(cleaned_svg.encode('utf-8'), True) # pylint: disable=c-extension-no-member
|
||||
svg_dom = skia.SVGDOM.MakeFromStream(stream) # pylint: disable=c-extension-no-member
|
||||
|
||||
if svg_dom is None:
|
||||
raise ValueError(f"Failed to parse SVG content for image {i}")
|
||||
@ -125,9 +125,9 @@ class SVGToImage(CustomNode):
|
||||
width = int(svg_width * scale)
|
||||
height = int(svg_height * scale)
|
||||
|
||||
surface = skia.Surface(width, height)
|
||||
surface = skia.Surface(width, height) # pylint: disable=c-extension-no-member
|
||||
with surface as canvas:
|
||||
canvas.clear(skia.ColorTRANSPARENT)
|
||||
canvas.clear(skia.ColorTRANSPARENT) # pylint: disable=c-extension-no-member
|
||||
|
||||
canvas.scale(scale, scale)
|
||||
svg_dom.render(canvas)
|
||||
@ -153,7 +153,6 @@ class SVGToImage(CustomNode):
|
||||
if not raster_images:
|
||||
raise ValueError("No valid images were generated from the input SVGs")
|
||||
|
||||
# Stack all images into a single batch
|
||||
batch = torch.stack(raster_images)
|
||||
|
||||
return (batch,)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user