diff options
Diffstat (limited to 'sys/nixpkgs/pkgs/update_vim_plugins')
3 files changed, 9 insertions, 15 deletions
diff --git a/sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh b/sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh index dcf8b46f..781b8aeb 100755 --- a/sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh +++ b/sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh @@ -5,12 +5,10 @@ count=$(echo "$plugins" | uniq -d | wc -l) echo "duplicates count: $count" -if [ "$count" -gt 0 ] -then +if [ "$count" -gt 0 ]; then filtered_plugins=$(echo "$plugins" | uniq -d) - if [ "$1" == "check-only" ] - then + if [ "$1" == "check-only" ]; then echo "$filtered_plugins" exit 1 else @@ -21,22 +19,18 @@ then # iterate over plugins we found missing and # compare them to all open issues. # We no matching issue was found, we create a new one - for f in $filtered_plugins # do not add " " here. It would break the plugin - do + for f in $filtered_plugins; do # do not add " " here. It would break the plugin found=false - for k in $known_issues - do - if [[ "$f" == "$k" ]] - then + for k in $known_issues; do + if [[ $f == "$k" ]]; then found=true break fi done # test if matching issue was found - if ! $found - then + if ! $found; then echo "Did not find an issue for $f. Creating a new one ..." gh issue create --title "Detected broken plugin: $f" --label "bot" --body "$f" else diff --git a/sys/nixpkgs/pkgs/update_vim_plugins/pyproject.toml b/sys/nixpkgs/pkgs/update_vim_plugins/pyproject.toml index d73a63f8..38caf76d 100644 --- a/sys/nixpkgs/pkgs/update_vim_plugins/pyproject.toml +++ b/sys/nixpkgs/pkgs/update_vim_plugins/pyproject.toml @@ -3,7 +3,7 @@ name = "update_vim_plugins" version = "0.1.0" description = "" authors = ["Your Name <you@example.com>"] -packages = [{include = "update_vim_plugins"}] +packages = [{ include = "update_vim_plugins" }] [tool.poetry.scripts] update-vim-plugins = "update_vim_plugins.__main__:main" diff --git a/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/spec.py b/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/spec.py index 04f25ccc..edbd876b 100644 --- a/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/spec.py +++ b/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/spec.py @@ -35,7 +35,7 @@ class PluginSpec: branch_regex = r"(:(?P<branch>[^:]+)?)" name_regex = r"(:(?P<name>[^:]+)?)" license_regex = r"(:(?P<license>[^:]+)?)" - marked_duplicate_regex = r'(:(?P<duplicate>duplicate))' + marked_duplicate_regex = r"(:(?P<duplicate>duplicate))" spec_regex = re.compile( f"^{repository_host_regex}?{owner_regex}/{repo_regex}{branch_regex}?{name_regex}?{license_regex}?{marked_duplicate_regex}?$", @@ -60,7 +60,7 @@ class PluginSpec: branch = group_dict.get("branch") name = group_dict.get("name") license = group_dict.get("license") - marked_duplicate = bool(group_dict.get("duplicate")) # True if 'duplicate', False if None + marked_duplicate = bool(group_dict.get("duplicate")) # True if 'duplicate', False if None line = spec |