Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#31)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.8.1](astral-sh/ruff-pre-commit@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 <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and nstarman authored Dec 9, 2024
1 parent cd1c561 commit 1146df8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,17 @@ 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",
"FBT003",
"N802",
"PD",
"RET505", "RET506", "RET507",
"RUF022", # `__all__` is not sorted

# flake8-self
"SLF001", # Private member accessed
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/cosmology/compat/astropy/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/cosmology/compat/astropy/_standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1146df8

Please sign in to comment.