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

use black 24 #382

Merged
merged 1 commit into from
Jan 29, 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 environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
- statsmodels
- xarray>=2023.04 # because pandas 2 is required
# for testing
- black<23.1
- black!=23
- flake8
- isort
- pytest
Expand Down
1 change: 1 addition & 0 deletions examples/config_tas_cmip6ng_example.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Example configuration file
"""

import os.path

from mesmer.create_emulations import create_seed_dict
Expand Down
5 changes: 2 additions & 3 deletions mesmer/calibrate_mesmer/calibrate_mesmer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Functions to calibrate all modules of MESMER
"""

import logging
import warnings

Expand Down Expand Up @@ -212,9 +213,7 @@ def _calibrate_tas(
)

if use_tas2:
gt_tas2_s = {
scen: gt_tas_scen**2 for scen, gt_tas_scen in gt_tas_s.items()
}
gt_tas2_s = {scen: gt_tas_scen**2 for scen, gt_tas_scen in gt_tas_s.items()}

if use_hfds:
gt_hfds_s = gather_gt_data(
Expand Down
2 changes: 2 additions & 0 deletions mesmer/stats/_gaspari_cohn.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ def _gaspari_cohn_np(r):
sel = (r >= 0) & (r < 1)
r_sel = r[sel]

# fmt: off
out[sel] = (
1
- 5 / 3 * r_sel**2
+ 5 / 8 * r_sel**3
+ 1 / 2 * r_sel**4
- 1 / 4 * r_sel**5
)
# fmt: on

# compute for 1 <= r < 2
sel = (r >= 1) & (r < 2)
Expand Down
1 change: 1 addition & 0 deletions scripts/test_install.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test that all of our modules can be imported
Thanks https://stackoverflow.com/a/25562415/10473080
"""

import importlib
import pkgutil

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ tests =
dev =
%(docs)s
%(tests)s
black < 23
black !=23
flake8
isort
twine
Expand Down