Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #304

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
hooks:
- id: toml-sort-fix
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.2.0
hooks:
- id: ruff
args: [ --fix ]
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from pathlib import Path

sys.path.insert(0, Path("../..").resolve())
import icclim # noqa: E402 (import need to be after path update)
import icclim # (import need to be after path update)

# -- Project information -----------------------------------------------------
project = "icclim"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_generated_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ def build_expected_args(index: StandardIndex):
def test_generated_api(generic_index_fun_mock: MagicMock):
for i in EcadIndexRegistry.values():
# GIVEN
api_index_fun = eval(f"icclim.{i.short_name.lower()}") # noqa: PGH001
api_index_fun = eval(f"icclim.{i.short_name.lower()}")
# WHEN
api_index_fun(**DEFAULT_ARGS)
# THEN
expected_call_args = build_expected_args(i)
generic_index_fun_mock.assert_called_with(**expected_call_args)
for g in GenericIndicatorRegistry.values():
# GIVEN
api_index_fun = eval(f"icclim.{g.name.lower()}") # noqa: PGH001
api_index_fun = eval(f"icclim.{g.name.lower()}")
# WHEN
api_index_fun(**DEFAULT_ARGS)
generic_index_fun_mock.assert_called()
Expand Down
Loading