Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/.codecov.yml → .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ coverage:
status:
project:
default:
threshold: 0.5%
threshold: 0.1%
3 changes: 0 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,5 @@ jobs:
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
3 changes: 1 addition & 2 deletions comfy_cli/command/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def get_workspace() -> pathlib.Path:


def potentially_strip_param_url(path_name: str) -> str:
path_name = path_name.split("?")[0]
return path_name
return path_name.split("?")[0]


def check_huggingface_url(url: str) -> tuple[bool, Optional[str], Optional[str], Optional[str], Optional[str]]:
Expand Down
3 changes: 1 addition & 2 deletions comfy_cli/command/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ def format_image_path(self, img):
if subfolder:
filename = os.path.join(subfolder, filename)

filename = os.path.join(workspace_manager.get_workspace_path()[0], output_type, filename)
return filename
return os.path.join(workspace_manager.get_workspace_path()[0], output_type, filename)

query = urllib.parse.urlencode(img)
return f"http://{self.host}:{self.port}/view?{query}"
Expand Down
4 changes: 1 addition & 3 deletions comfy_cli/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ def parse_json(input_data):
input_data = input_data.decode("utf-8")

# Parse the string as JSON
json_object = json.loads(input_data)

return json_object
return json.loads(input_data)

except json.JSONDecodeError as e:
# Handle JSON decoding error
Expand Down
3 changes: 1 addition & 2 deletions comfy_cli/registry/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ def list_all_nodes(self):
response = requests.get(url)
if response.status_code == 200:
raw_nodes = response.json()["nodes"]
mapped_nodes = [map_node_to_node_class(node) for node in raw_nodes]
return mapped_nodes
return [map_node_to_node_class(node) for node in raw_nodes]
else:
raise Exception(f"Failed to retrieve nodes: {response.status_code} - {response.text}")

Expand Down
3 changes: 1 addition & 2 deletions comfy_cli/workspace_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,7 @@ def get_comfyui_manager_path(self):
return None

# To check more robustly, verify up to the `.git` path.
manager_path = os.path.join(self.workspace_path, "custom_nodes", "ComfyUI-Manager")
return manager_path
return os.path.join(self.workspace_path, "custom_nodes", "ComfyUI-Manager")

def is_comfyui_manager_installed(self):
if self.workspace_path is None:
Expand Down
16 changes: 10 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ target-version = "py39"

line-length = 120
lint.select = [
"E4", # default
"E7", # default
"E9", # default
"F", # default
"I", # isort-like behavior (import statement sorting)
"UP", # pyupgrade
"E", # pycodestyle - Error
"F", # default
"I", # isort-like behavior (import statement sorting)
"Q", # flake8-quotes
"RET504", # Unnecessary assignment to {name} before return statement
"UP", # pyupgrade
"W", # pycodestyle - Warning
]
lint.extend-ignore = [
"E501", # Line too long
]
Loading