Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Nov 25, 2024
1 parent a62e1f4 commit f962c3b
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ create a copy of [`sample.env`](./abcli/sample.env) as `.env` and fill in the se

[![pylint](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/awesome-bash-cli/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/awesome-bash-cli/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/awesome-bash-cli/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/abcli.svg)](https://pypi.org/project/abcli/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/abcli)](https://pypistats.org/packages/abcli)

built by 🌀 [`blue_options-4.161.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.423.1`](https://github.com/kamangir/awesome-bash-cli).
built by 🌀 [`blue_options-4.162.1`](https://github.com/kamangir/awesome-bash-cli), based on 🪄 [`abcli-9.425.1`](https://github.com/kamangir/awesome-bash-cli).
16 changes: 9 additions & 7 deletions abcli/.abcli/tests/help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ function test_abcli_help() {

local module
for module in \
"@pypi" \
"@pypi browse" \
"@pypi build" \
"@pypi install" \
\
"@pytest" \
\
"@batch browse" \
"@batch cat" \
"@batch eval" \
Expand Down Expand Up @@ -75,6 +68,15 @@ function test_abcli_help() {
"@plugins list_of_installed" \
"@plugins transform" \
\
"@pylint" \
\
"@pypi" \
"@pypi browse" \
"@pypi build" \
"@pypi install" \
\
"@pytest" \
\
"@repeat" \
\
"@seed" \
Expand Down
2 changes: 1 addition & 1 deletion abcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

DESCRIPTION = f"{ICON} a language to speak AI."

VERSION = "9.423.1"
VERSION = "9.425.1"

REPO_NAME = "awesome-bash-cli"

Expand Down
6 changes: 6 additions & 0 deletions abcli/help/generic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import List, Dict, Callable, Union

from abcli.help.pypi import help_functions as help_pypi
from abcli.help.pylint import help_pylint
from abcli.help.pytest import help_pytest
from abcli.help.test import help_functions as help_test

Expand All @@ -10,6 +11,11 @@ def help_functions(
) -> Union[Callable, Dict[str, Union[Callable, Dict]]]:
return {
"pypi": help_pypi(plugin_name=plugin_name),
"pylint": lambda tokens, mono: help_pylint(
tokens,
mono=mono,
plugin_name=plugin_name,
),
"pytest": lambda tokens, mono: help_pytest(
tokens,
mono=mono,
Expand Down
30 changes: 30 additions & 0 deletions abcli/help/pylint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from typing import List

from blue_options.terminal import show_usage, xtra


def help_pylint(
tokens: List[str],
mono: bool,
plugin_name: str = "abcli",
) -> str:
options = xtra(
"ignore=<ignore>",
mono=mono,
)

callable = f"{plugin_name} pylint"

if plugin_name == "abcli":
options = f"{options},plugin=<plugin-name>"
callable = "@pylint"

return show_usage(
callable.split(" ")
+ [
f"[{options}]",
"[<args>]",
],
f"pylint {plugin_name}.",
mono=mono,
)

0 comments on commit f962c3b

Please sign in to comment.