diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 447ddaa..f74763a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,8 @@ jobs: python-version: ${{ matrix.python }} - name: Install Tox run: pip install tox - - name: Run black - run: tox -e black + - name: Run ruff formatter + run: tox -e ruff-format - name: Run ruff run: tox -e ruff - name: Run mypy diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5237ce8..5c3fceb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,13 +6,10 @@ repos: exclude: ^tests/output/ - id: trailing-whitespace exclude: ^tests/output/ - - repo: "https://github.com/psf/black" - rev: 24.3.0 - hooks: - - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit rev: v0.3.5 hooks: + - id: ruff-format - id: ruff args: [--fix, --exit-non-zero-on-fix] - repo: "https://github.com/pre-commit/mirrors-mypy" diff --git a/README.md b/README.md index c2fdbf1..67065a6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![PyPI](https://img.shields.io/pypi/v/conan-check-updates)](https://pypi.org/project/conan-check-updates) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/conan-check-updates)](https://pypi.org/project/conan-check-updates) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff) +[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) Check for updates of your `conanfile.txt` / `conanfile.py` requirements. @@ -36,6 +36,7 @@ for line in usage.splitlines(): cog.outl(line) cog.outl("```") ]]] --> + ``` usage: conan-check-updates [--cwd CWD] [--target {major,minor,patch}] [--timeout TIMEOUT] [-u] [-V] [-h] @@ -62,6 +63,7 @@ options: -V, --version Show the version and exit. -h, --help Show this message and exit. ``` + ## Contributing diff --git a/docs/generate_screenshot.py b/docs/generate_screenshot.py index e013518..c5efabb 100644 --- a/docs/generate_screenshot.py +++ b/docs/generate_screenshot.py @@ -13,7 +13,7 @@ HERE = Path(__file__).parent -URL_TERMSHOT = "https://github.com/homeport/termshot/releases/download/v0.2.5/termshot_0.2.5_linux_amd64.tar.gz" # noqa, pylint: disable=line-too-long +URL_TERMSHOT = "https://github.com/homeport/termshot/releases/download/v0.2.5/termshot_0.2.5_linux_amd64.tar.gz" CONANFILE = """ [requires] diff --git a/pyproject.toml b/pyproject.toml index 01ab8d8..b239be4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,6 @@ tests = [ "pytest-rerunfailures", ] tools = [ - "black", "cogapp>=3", "mypy>=0.9", # pyproject.toml support "pre-commit", @@ -122,18 +121,18 @@ source = ["src", ".tox/*/site-packages"] legacy_tox_ini = """ [tox] envlist = - black + ruff-format ruff mypy py{37, 38, 39, 310, 311, 312}-{v1, v2} coverage-report -[testenv:black] +[testenv:ruff-format] skip_install = true -deps = black +deps = ruff commands = - black --diff . - black --check . + ruff format --diff . + ruff format --check . [testenv:ruff] skip_install = true diff --git a/src/conan_check_updates/version.py b/src/conan_check_updates/version.py index 5f0d374..c6e275f 100644 --- a/src/conan_check_updates/version.py +++ b/src/conan_check_updates/version.py @@ -254,7 +254,7 @@ class VersionRange: - https://github.com/npm/node-semver - https://github.com/conan-io/conan/blob/develop2/conans/model/version_range.py - https://github.com/conan-io/conan/blob/develop2/conans/test/unittests/model/version/test_version_range.py - """ # noqa, pylint: disable=line-too-long + """ def __init__(self, value: str): self._str = value