Skip to content

Commit

Permalink
pylint refactor - kamangir/bolt#1234
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Feb 25, 2024
1 parent 44c84d4 commit f826eeb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion abcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

NAME = "abcli"

VERSION = "7.2788.1"
VERSION = "7.2795.1"

DESCRIPTION = "🚀 a language to speak AI."

Expand Down
2 changes: 2 additions & 0 deletions bash/plugins/alias.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ alias @option::int=abcli_option_int
alias @option::choice=abcli_option_choice
alias @option::subset=abcli_option_subset

alias @pip=abcli_pip

alias @plugins=abcli_plugins

alias @pylint=abcli_pylint
Expand Down
22 changes: 22 additions & 0 deletions bash/plugins/pip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#! /usr/bin/env bash

function abcli_pip() {
local task=$1

if [[ "$task" == "help" ]]; then
abcli_show_usage "abcli pip install <module>" \
"install <module>."
return
fi

if [ "$task" == "install" ]; then
local module=$2

python3 -c "import $module" &>/dev/null ||
pip3 install $module

return
fi

abcli_log_error "-abcli: pip: $task: command not found."
}
6 changes: 3 additions & 3 deletions bash/plugins/pylint.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#! /usr/bin/env bash

export abcli_pylint_ignored=W1203,C0103,C0111,C0114,C0115,C0116,C0411,W0404,W0237,C0209,C0415,W0621,W0702,W0102,W1202,E0401,W1514,C3002,W0401,W0611,C0413,C0412,W0603,R0911,E1101,W0622,R1721,W0718,R1728,C3001,R0801,R0401,R0914,R0913,R0915,W0123,R0912,C0301,W0511,W0105,W0613,R0902,R0903,R1735,W1401,W3101
export abcli_pylint_ignored=W1203,C0103,C0111,C0114,C0115,C0116,C0411,W0404,W0237,C0209,C0415,W0621,W0702,W0102,W1202,E0401,W1514,C3002,W0401,W0611,C0413,C0412,W0603,R0911,E1101,W0622,R1721,W0718,R1728,C3001,R0801,R0401,R0914,R0913,R0915,W0123,R0912,C0301,W0511,W0105,W0613,R0902,R0903,R1735,W1401,W3101,W1308,E1102

function abcli_pylint() {
local options=$1

if [ $(abcli_option_int "$options" help 0) == 1 ]; then
abcli_show_usage "abcli pylint$ABCUL[<args>]" \
abcli_show_usage "abcli pylint [<args>]" \
"pylint abcli."
return
fi

pip3 install pylint
abcli_pip install pylint

pushd $abcli_path_git/awesome-bash-cli >/dev/null
pylint \
Expand Down

0 comments on commit f826eeb

Please sign in to comment.