Skip to content

Commit

Permalink
Make pre-commit happy
Browse files Browse the repository at this point in the history
  • Loading branch information
btschwertfeger committed Jan 25, 2025
1 parent a5c90bc commit aad6076
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions cmethods/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def cli(**kwargs) -> None:
datefmt="%Y/%m/%d %H:%M:%S",
level=logging.INFO,
)

logging.info("Loading data sets ...")
log = logging.getLogger(__name__)
log.info("Loading data sets ...")
try:
for key, message in zip(
("obs", "simh", "simp"),
Expand All @@ -194,15 +194,15 @@ def cli(**kwargs) -> None:
)
kwargs[key] = kwargs[key][kwargs["variable"]]
except (TypeError, KeyError) as exc:
logging.error(exc)
log.error(exc)
sys.exit(1)

logging.info("Data sets loaded ...")
log.info("Data sets loaded ...")
kwargs["n_quantiles"] = kwargs["quantiles"]
del kwargs["quantiles"]

logging.info("Applying %s ..." % kwargs["method"])
log.info("Applying %s ...", kwargs["method"])
result = adjust(**kwargs)

logging.info("Saving result to %s ..." % kwargs["output"])
log.info("Saving result to %s ...", kwargs["output"])
result.to_netcdf(kwargs["output"])
4 changes: 2 additions & 2 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_not_implemented_errors(
def test_adjust_failing_dqm(datasets: dict) -> None:
with pytest.raises(
ValueError,
match="This function is not available for detrended quantile mapping. "
match=r"This function is not available for detrended quantile mapping. "
"Please use cmethods.CMethods.detrended_quantile_mapping",
):
adjust(
Expand All @@ -118,7 +118,7 @@ def test_adjust_failing_dqm(datasets: dict) -> None:
def test_adjust_failing_no_group_for_distribution(datasets: dict) -> None:
with pytest.raises(
ValueError,
match="Can't use group for distribution based methods.",
match=r"Can't use group for distribution based methods.",
):
adjust(
method="quantile_mapping",
Expand Down

0 comments on commit aad6076

Please sign in to comment.