diff --git a/.github/.codecov.yml b/.github/codecov.yml similarity index 88% rename from .github/.codecov.yml rename to .github/codecov.yml index fcf49dc..e5c9a38 100644 --- a/.github/.codecov.yml +++ b/.github/codecov.yml @@ -8,4 +8,4 @@ coverage: status: project: default: - threshold: 0.5% + threshold: 0.1% diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index ebc4a35..b0a9df3 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -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 diff --git a/comfy_cli/command/models/models.py b/comfy_cli/command/models/models.py index 005176f..a319fd4 100644 --- a/comfy_cli/command/models/models.py +++ b/comfy_cli/command/models/models.py @@ -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]]: diff --git a/comfy_cli/command/run.py b/comfy_cli/command/run.py index a2561c1..c5abf42 100644 --- a/comfy_cli/command/run.py +++ b/comfy_cli/command/run.py @@ -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}" diff --git a/comfy_cli/file_utils.py b/comfy_cli/file_utils.py index 0fc05f5..fb17190 100644 --- a/comfy_cli/file_utils.py +++ b/comfy_cli/file_utils.py @@ -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 diff --git a/comfy_cli/registry/api.py b/comfy_cli/registry/api.py index 980aab3..148de31 100644 --- a/comfy_cli/registry/api.py +++ b/comfy_cli/registry/api.py @@ -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}") diff --git a/comfy_cli/workspace_manager.py b/comfy_cli/workspace_manager.py index 58b211d..3c58272 100644 --- a/comfy_cli/workspace_manager.py +++ b/comfy_cli/workspace_manager.py @@ -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: diff --git a/pyproject.toml b/pyproject.toml index c4c9702..27efecd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 ]