mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-10 18:05:16 +00:00
Fix and enforce new lines at the end of files.
This commit is contained in:
parent
3507870535
commit
d9b7cfac7e
@ -10,4 +10,4 @@ class FileService:
|
|||||||
if directory_key not in self.allowed_directories:
|
if directory_key not in self.allowed_directories:
|
||||||
raise ValueError("Invalid directory key")
|
raise ValueError("Invalid directory key")
|
||||||
directory_path: str = self.allowed_directories[directory_key]
|
directory_path: str = self.allowed_directories[directory_key]
|
||||||
return self.file_system_ops.walk_directory(directory_path)
|
return self.file_system_ops.walk_directory(directory_path)
|
||||||
|
@ -39,4 +39,4 @@ class FileSystemOperations:
|
|||||||
"path": relative_path,
|
"path": relative_path,
|
||||||
"type": "directory"
|
"type": "directory"
|
||||||
})
|
})
|
||||||
return file_list
|
return file_list
|
||||||
|
@ -51,4 +51,4 @@ class AppSettings():
|
|||||||
settings = self.get_settings(request)
|
settings = self.get_settings(request)
|
||||||
settings[setting_id] = await request.json()
|
settings[setting_id] = await request.json()
|
||||||
self.save_settings(request, settings)
|
self.save_settings(request, settings)
|
||||||
return web.Response(status=200)
|
return web.Response(status=200)
|
||||||
|
@ -194,4 +194,4 @@ class AdamWwithEMAandWings(optim.Optimizer):
|
|||||||
for param, ema_param in zip(params_with_grad, ema_params_with_grad):
|
for param, ema_param in zip(params_with_grad, ema_params_with_grad):
|
||||||
ema_param.mul_(cur_ema_decay).add_(param.float(), alpha=1 - cur_ema_decay)
|
ema_param.mul_(cur_ema_decay).add_(param.float(), alpha=1 - cur_ema_decay)
|
||||||
|
|
||||||
return loss
|
return loss
|
||||||
|
@ -121,4 +121,4 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
|||||||
"Load3D": "Load 3D",
|
"Load3D": "Load 3D",
|
||||||
"Load3DAnimation": "Load 3D - Animation",
|
"Load3DAnimation": "Load 3D - Animation",
|
||||||
"Preview3D": "Preview 3D"
|
"Preview3D": "Preview 3D"
|
||||||
}
|
}
|
||||||
|
@ -46,4 +46,4 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
|
|
||||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||||
"Morphology": "ImageMorphology",
|
"Morphology": "ImageMorphology",
|
||||||
}
|
}
|
||||||
|
@ -30,4 +30,4 @@ NODE_CLASS_MAPPINGS = {
|
|||||||
|
|
||||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||||
"WebcamCapture": "Webcam Capture",
|
"WebcamCapture": "Webcam Capture",
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ lint.ignore = ["ALL"]
|
|||||||
lint.select = [
|
lint.select = [
|
||||||
"S307", # suspicious-eval-usage
|
"S307", # suspicious-eval-usage
|
||||||
"T201", # print-usage
|
"T201", # print-usage
|
||||||
|
"W292",
|
||||||
"W293",
|
"W293",
|
||||||
# The "F" series in Ruff stands for "Pyflakes" rules, which catch various Python syntax errors and undefined names.
|
# The "F" series in Ruff stands for "Pyflakes" rules, which catch various Python syntax errors and undefined names.
|
||||||
# See all rules here: https://docs.astral.sh/ruff/rules/#pyflakes-f
|
# See all rules here: https://docs.astral.sh/ruff/rules/#pyflakes-f
|
||||||
|
@ -95,4 +95,4 @@ def test_get_save_image_path(temp_dir):
|
|||||||
assert filename == "test"
|
assert filename == "test"
|
||||||
assert counter == 1
|
assert counter == 1
|
||||||
assert subfolder == ""
|
assert subfolder == ""
|
||||||
assert filename_prefix == "test"
|
assert filename_prefix == "test"
|
||||||
|
@ -49,4 +49,4 @@ def test_handles_no_extension():
|
|||||||
|
|
||||||
def test_handles_no_files():
|
def test_handles_no_files():
|
||||||
files = []
|
files = []
|
||||||
assert filter_files_content_types(files, ["image", "audio", "video"]) == []
|
assert filter_files_content_types(files, ["image", "audio", "video"]) == []
|
||||||
|
Loading…
Reference in New Issue
Block a user