{ "name": "ruff", "version": "0.17.0", "summary": "ruff: a fast Python linter and formatter, with automatic fixes (Rust)", "category": "tool", "license": "MIT", "homepage": "https://docs.astral.sh/ruff/", "source": { "url": "https://github.com/astral-sh/ruff/archive/refs/tags/0.17.0.tar.gz", "sha256": "2df40dc573eb751154b49055d0949668ec4f72f928d9c7fe5d86f451bfb3d7d5" }, "watch": {"kind": "github-release", "repo": "astral-sh/ruff", "tag_regex": "^([0-9]+\\.[0-9]+\\.[0-9]+)$", "revendor": {"tool": "cargo", "lockfile": "Cargo.lock"}}, "vendor": "vendor.txt", "deps": [], "env_packages": [], "static": true, "nss": true, "check": "bin/ruff --version | has -x 'ruff 0.17.0' && t=$(mktemp -d) && p=$PWD && cd \"$t\" && printf 'import os\\nimport sys\\n\\n\\ndef f( a,b ):\\n return a+b\\n\\nprint(f(1,2))\\n' > a.py && ! HOME=$t \"$p/bin/ruff\" check --no-cache --output-format concise a.py < /dev/null > check.txt 2>&1 && has -x 'a.py:1:8: F401 \\[\\*\\] `os` imported but unused' < check.txt && has -x 'a.py:2:8: F401 \\[\\*\\] `sys` imported but unused' < check.txt && HOME=$t \"$p/bin/ruff\" check --no-cache --fix a.py < /dev/null > /dev/null 2>&1 && HOME=$t \"$p/bin/ruff\" format --no-cache a.py < /dev/null > /dev/null 2>&1 && [ \"$(cat a.py)\" = \"$(printf 'def f(a, b):\\n return a + b\\n\\n\\nprint(f(1, 2))')\" ] && HOME=$t \"$p/bin/ruff\" check --no-cache a.py < /dev/null | has -x 'All checks passed!' && echo 'ruff 0.17.0: two unused imports found with their places and codes, fixed, the file formatted, then clean'" }