Skip to content

Commit

Permalink
dev/list-plugins: deprecate Kind.UNKNOWN completely
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage authored and nix-infra-bot committed Dec 15, 2024
1 parent a7afed6 commit 3726dbe
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions flake-modules/dev/list-plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@


class Kind(Enum):
UNKNOWN = 1
NEOVIM = 2
VIM = 3
MISC = 4
NEOVIM = 1
VIM = 2
MISC = 3


class State(Enum):
Expand Down Expand Up @@ -147,8 +146,6 @@ def __str__(self) -> str:
state_icon: str = self.state.value
kind_icon: str
match self.kind:
case Kind.UNKNOWN:
kind_icon = "\033[93m" + QUESTION_MARK
case Kind.NEOVIM:
kind_icon = "\033[94m" + " "
case Kind.VIM:
Expand Down Expand Up @@ -186,7 +183,7 @@ def parse_file(path: str) -> Optional[Plugin]:
)

state: State = State.UNKNOWN
kind: Kind = Kind.UNKNOWN
kind: Kind
if re.match(
re.compile(r".*mkNeovimPlugin", re.DOTALL),
file_content,
Expand Down Expand Up @@ -254,7 +251,7 @@ def main(args):
"-k",
"--kind",
choices=[k.name.lower() for k in Kind],
help="Filter plugins by kind (neovim, vim, misc, unknown)",
help="Filter plugins by kind (neovim, vim, misc)",
)
parser.add_argument(
"-s",
Expand Down

0 comments on commit 3726dbe

Please sign in to comment.