1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 15:04:50 +08:00

Fix and enforce no trailing whitespace.

This commit is contained in:
comfyanonymous
2024-12-31 03:16:37 -05:00
parent a90aafafc1
commit b7572b2f87
20 changed files with 51 additions and 50 deletions

View File

@@ -32,7 +32,7 @@ class TestCompareImageMetrics:
@fixture(scope="class")
def test_file_names(self, args_pytest):
test_dir = args_pytest['test_dir']
fnames = self.gather_file_basenames(test_dir)
fnames = self.gather_file_basenames(test_dir)
yield fnames
del fnames
@@ -84,7 +84,7 @@ class TestCompareImageMetrics:
file_match = self.find_file_match(baseline_file_path, file_paths)
assert file_match is not None, f"Could not find a file in {args_pytest['test_dir']} with matching metadata to {baseline_file_path}"
# For a baseline image file, finds the corresponding file name in test_dir and
# For a baseline image file, finds the corresponding file name in test_dir and
# compares the images using the metrics in METRICS
@pytest.mark.parametrize("metric", METRICS.keys())
def test_pipeline_compare(
@@ -181,7 +181,7 @@ class TestCompareImageMetrics:
# Find file match
# Reorder test_file_names so that the file with matching name is first
# This is an optimization because matching file names are more likely
# This is an optimization because matching file names are more likely
# to have matching metadata if they were generated with the same script
basename = os.path.basename(baseline_file)
file_path_basenames = [os.path.basename(f) for f in file_paths]

View File

@@ -40,8 +40,8 @@ class ComfyClient:
def __init__(self):
self.test_name = ""
def connect(self,
listen:str = '127.0.0.1',
def connect(self,
listen:str = '127.0.0.1',
port:Union[str,int] = 8188,
client_id: str = str(uuid.uuid4())
):
@@ -125,7 +125,7 @@ class TestExecution:
def _server(self, args_pytest, request):
# Start server
pargs = [
'python','main.py',
'python','main.py',
'--output-directory', args_pytest["output_dir"],
'--listen', args_pytest["listen"],
'--port', str(args_pytest["port"]),

View File

@@ -23,7 +23,7 @@ These tests generate and save images through a range of parameters
"""
class ComfyGraph:
def __init__(self,
def __init__(self,
graph: dict,
sampler_nodes: list[str],
):
@@ -59,8 +59,8 @@ class ComfyGraph:
class ComfyClient:
# From examples/websockets_api_example.py
def connect(self,
listen:str = '127.0.0.1',
def connect(self,
listen:str = '127.0.0.1',
port:Union[str,int] = 8188,
client_id: str = str(uuid.uuid4())
):
@@ -152,7 +152,7 @@ class TestInference:
def _server(self, args_pytest):
# Start server
p = subprocess.Popen([
'python','main.py',
'python','main.py',
'--output-directory', args_pytest["output_dir"],
'--listen', args_pytest["listen"],
'--port', str(args_pytest["port"]),