Skip to content

Commit

Permalink
Pass Tox
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Jun 19, 2024
1 parent eac9fbd commit 1f1e304
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions icm/commands/cmd_rm.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""Remove installed collections"""

import shutil
from icm.commons import commons

import click

from icm.commons import commons


def main(coltag: str) -> None:
"""ENTRY POINT: Remove collections
Expand Down Expand Up @@ -33,8 +33,8 @@ def main(coltag: str) -> None:

# -- Parse the collection name: Get the name and version
parsed_coltag = collection.parse_coltag2(coltag)
name = parsed_coltag['name']
version = parsed_coltag['version']
name = parsed_coltag["name"]
version = parsed_coltag["version"]

# -- If there is name and version: The collection does not exists
if name and version:
Expand All @@ -43,7 +43,9 @@ def main(coltag: str) -> None:

# -- List all the collections that starts with "name-"
list_col = [
file.name for file in folders.collections.glob(f"{name}-*") if file.is_dir()
file.name
for file in folders.collections.glob(f"{name}-*")
if file.is_dir()
]

# -- No collection has a name that starts with "<name>-"
Expand Down
2 changes: 1 addition & 1 deletion icm/commons/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def parse_coltag(self, coltag: str) -> dict: # or | None:

# -- No match. Incorrect collection tag
return None

def parse_coltag2(self, coltag: str) -> dict: # or | None:
"""Parse a collection name with optional tag version
Ex: "iceK-0.1.4"
Expand Down

0 comments on commit 1f1e304

Please sign in to comment.