From 1146df841debb7c88b6cf915b52290965c319619 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2024 23:23:11 -0500 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#31) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.8.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.8.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ci: update ruff config --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Nathaniel Starkman --- .pre-commit-config.yaml | 2 +- pyproject.toml | 11 ++++++----- src/cosmology/compat/astropy/_core.py | 2 +- src/cosmology/compat/astropy/_standard.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9982ef8..ca86e8b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: - id: text-unicode-replacement-char - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.7.2" + rev: "v0.8.1" hooks: - id: ruff args: diff --git a/pyproject.toml b/pyproject.toml index c78e550..6286223 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -143,9 +143,9 @@ where = ["src"] target-version = "py39" line-length = 88 -select = ["ALL"] -ignore = [ - "ANN101", "ANN102", "ANN401", +lint.select = ["ALL"] +lint.ignore = [ + "ANN401", "ARG001", "ARG002", "COM812", # trailing-comma-missing "D105", "D107", "D203", "D213", "D401", @@ -153,6 +153,7 @@ ignore = [ "N802", "PD", "RET505", "RET506", "RET507", + "RUF022", # `__all__` is not sorted # flake8-self "SLF001", # Private member accessed @@ -165,11 +166,11 @@ ignore = [ "TD003", # Missing issue link on the line following this TODO ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "test_*.py" = ["ANN", "D", "N801", "N806", "S101", "SLF001"] "docs/*.py" = ["INP001"] -[tool.ruff.isort] +[tool.ruff.lint.isort] known-third-party = [ "astropy", "numpy", diff --git a/src/cosmology/compat/astropy/_core.py b/src/cosmology/compat/astropy/_core.py index 1d3749b..40da876 100644 --- a/src/cosmology/compat/astropy/_core.py +++ b/src/cosmology/compat/astropy/_core.py @@ -6,7 +6,7 @@ from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Callable, Union, cast -from astropy.cosmology import Cosmology as AstropyCosmology # noqa: TCH002 +from astropy.cosmology import Cosmology as AstropyCosmology # noqa: TC002 from astropy.units import Quantity from typing_extensions import TypeAlias diff --git a/src/cosmology/compat/astropy/_standard.py b/src/cosmology/compat/astropy/_standard.py index f469705..5c87ac2 100644 --- a/src/cosmology/compat/astropy/_standard.py +++ b/src/cosmology/compat/astropy/_standard.py @@ -4,7 +4,7 @@ from dataclasses import dataclass -from astropy.cosmology import FLRW # noqa: TCH002 +from astropy.cosmology import FLRW # noqa: TC002 from cosmology.compat.astropy._components import ( BaryonComponent,