Skip to content

Commit

Permalink
update precommits and fix fstring
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmeagher committed Feb 20, 2025
1 parent d71aee0 commit 0c31d7a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SPDX-FileCopyrightText: © 2024 the SimWeights contributors
#
# SPDX-License-Identifier: BSD-2-Clause

version: 2
updates:
- package-ecosystem: "pip"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SPDX-FileCopyrightText: © 2022 the SimWeights contributors
#
# SPDX-License-Identifier: BSD-2-Clause

name: Docs
on:
push:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# SPDX-FileCopyrightText: © 2022 the SimWeights contributors
#
# SPDX-License-Identifier: BSD-2-Clause

name: Tests
on:
push:
Expand Down
13 changes: 6 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# SPDX-FileCopyrightText: © 2022 the SimWeights contributors
#
# SPDX-License-Identifier: BSD-2-Clause

ci:
autoupdate_commit_msg: autoupdate pre-commit hooks
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/google/yamlfmt
rev: v0.15.0
rev: v0.16.0
hooks:
- id: yamlfmt
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
Expand All @@ -20,7 +19,7 @@ repos:
hooks:
- id: reuse
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell
- repo: https://github.com/adamchainz/blacken-docs
Expand All @@ -29,21 +28,21 @@ repos:
- id: blacken-docs
args: [-l 100]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
rev: v1.15.0
hooks:
- id: mypy
files: simweights
additional_dependencies: [numpy]
exclude: ^contrib/
- repo: https://github.com/pycqa/pylint
rev: v3.3.3
rev: v3.3.4
hooks:
- id: pylint
files: simweights
exclude: ^contrib/
additional_dependencies: [numpy, pandas]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
rev: v0.9.7
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand Down Expand Up @@ -91,7 +90,7 @@ repos:
- id: trailing-whitespace
exclude: \.svg$
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "3.0.3"
rev: "3.2.0"
hooks:
- id: editorconfig-checker
alias: ec
2 changes: 1 addition & 1 deletion src/simweights/_generation_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_epdf(
if shape is None:
shape = cols[key].shape
else:
assert shape == cols[key].shape # type: ignore[unreachable]
assert shape == cols[key].shape
assert shape is not None
count = np.zeros(shape, dtype=np.float64)
# loop over particle type
Expand Down
2 changes: 1 addition & 1 deletion src/simweights/_weighter.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def get_weights(self: Weighter, flux: Any) -> NDArray[np.float64]:
except KeyError as missing_params:
mesg = (
f"get_weights() was passed callable {flux!r} which has parameters {list(keys)}. "
f"The weight columns which are available are {repr(self.colnames)}"
f"The weight columns which are available are {self.colnames!r}"
)
raise ValueError(mesg) from missing_params
flux_val = flux(**arguments)
Expand Down

0 comments on commit 0c31d7a

Please sign in to comment.