From 2a8b11b590694e38d6e6699832e4babf98f8908b Mon Sep 17 00:00:00 2001 From: F-G Fernandez <26927750+frgfm@users.noreply.github.com> Date: Wed, 24 Jan 2024 14:00:08 +0100 Subject: [PATCH] style: Bumps ruff to 0.1.14 (#232) * chore: Bumps ruff to 0.1.14 * ci: Updates CI * docs: Update README badge * style: Fixes lint & format --- .github/collect_env.py | 2 +- .github/workflows/style.yml | 4 ++-- .pre-commit-config.yaml | 2 +- README.md | 4 ++-- pyproject.toml | 2 +- torchcam/methods/activation.py | 2 +- torchcam/methods/gradient.py | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/collect_env.py b/.github/collect_env.py index 9948a28..26ab4b7 100644 --- a/.github/collect_env.py +++ b/.github/collect_env.py @@ -14,7 +14,7 @@ import locale import os import re -import subprocess +import subprocess # noqa S404 import sys from pathlib import Path from typing import NamedTuple diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index d7b3db7..57dade8 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -21,7 +21,7 @@ jobs: architecture: x64 - name: Run ruff run: | - pip install ruff==0.1.11 + pip install ruff==0.1.14 ruff --version ruff check --diff . @@ -65,7 +65,7 @@ jobs: architecture: x64 - name: Run ruff run: | - pip install ruff==0.1.11 + pip install ruff==0.1.14 ruff --version ruff format --check --diff . diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 219249a..d94bf8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.1.11' + rev: 'v0.1.14' hooks: - id: ruff args: diff --git a/README.md b/README.md index 6c1d101..38860a8 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ ruff - - black + + ruff diff --git a/pyproject.toml b/pyproject.toml index 6959fe6..f9c3149 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,7 @@ test = [ "pytest-pretty>=1.0.0,<2.0.0", ] quality = [ - "ruff==0.1.11", + "ruff==0.1.14", "mypy==1.8.0", "pre-commit>=3.0.0,<4.0.0", ] diff --git a/torchcam/methods/activation.py b/torchcam/methods/activation.py index b7e76e1..01a9371 100644 --- a/torchcam/methods/activation.py +++ b/torchcam/methods/activation.py @@ -14,7 +14,7 @@ from ._utils import locate_linear_layer from .core import _CAM -__all__ = ["CAM", "ScoreCAM", "SSCAM", "ISCAM"] +__all__ = ["CAM", "ISCAM", "SSCAM", "ScoreCAM"] class CAM(_CAM): diff --git a/torchcam/methods/gradient.py b/torchcam/methods/gradient.py index 887a454..90d0f77 100644 --- a/torchcam/methods/gradient.py +++ b/torchcam/methods/gradient.py @@ -11,7 +11,7 @@ from .core import _CAM -__all__ = ["GradCAM", "GradCAMpp", "SmoothGradCAMpp", "XGradCAM", "LayerCAM"] +__all__ = ["GradCAM", "GradCAMpp", "LayerCAM", "SmoothGradCAMpp", "XGradCAM"] class _GradCAM(_CAM):