Skip to content

Commit

Permalink
Add and clean
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanx749 committed May 28, 2024
1 parent 7a3da73 commit 0f939af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pycdhit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from ._commands import * # noqa: F403
from ._io import * # noqa: F403

VERSION = "0.12.0"
VERSION = "0.13.0"

__all__ = [ # noqa: F405
"CommandBase",
Expand Down
14 changes: 10 additions & 4 deletions pycdhit/_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,17 @@ class CDHIT(CommandBase):
"""

_progs = {
"cd-hit",
"cd-hit-2d",
"cd-hit-est",
"cd-hit-est-2d",
"cd-hit-454",
}

def __init__(self, prog: str = "cd-hit", path: str = None):
if prog not in {"cd-hit", "cd-hit-2d", "cd-hit-est", "cd-hit-est-2d"}:
raise ValueError(
f"'{prog}' not in {{'cd-hit', 'cd-hit-2d', 'cd-hit-est', 'cd-hit-est-2d'}}" # noqa: E501
)
if prog not in self._progs:
raise ValueError(f"'{prog}' not in {self._progs}")
super().__init__(prog, path)

def help(self):
Expand Down

0 comments on commit 0f939af

Please sign in to comment.