diff --git a/environment.yml b/environment.yml index 5025c314..e1e71cb3 100644 --- a/environment.yml +++ b/environment.yml @@ -19,7 +19,7 @@ dependencies: - statsmodels - xarray>=2023.04 # because pandas 2 is required # for testing - - black<23.1 + - black!=23 - flake8 - isort - pytest diff --git a/examples/config_tas_cmip6ng_example.py b/examples/config_tas_cmip6ng_example.py index a7a5ec25..6e7b77b7 100644 --- a/examples/config_tas_cmip6ng_example.py +++ b/examples/config_tas_cmip6ng_example.py @@ -1,6 +1,7 @@ """ Example configuration file """ + import os.path from mesmer.create_emulations import create_seed_dict diff --git a/mesmer/calibrate_mesmer/calibrate_mesmer.py b/mesmer/calibrate_mesmer/calibrate_mesmer.py index 34f05e5f..93d7b8bf 100644 --- a/mesmer/calibrate_mesmer/calibrate_mesmer.py +++ b/mesmer/calibrate_mesmer/calibrate_mesmer.py @@ -1,6 +1,7 @@ """ Functions to calibrate all modules of MESMER """ + import logging import warnings @@ -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( diff --git a/mesmer/stats/_gaspari_cohn.py b/mesmer/stats/_gaspari_cohn.py index e75fc3bb..78b8f69a 100644 --- a/mesmer/stats/_gaspari_cohn.py +++ b/mesmer/stats/_gaspari_cohn.py @@ -94,6 +94,7 @@ def _gaspari_cohn_np(r): sel = (r >= 0) & (r < 1) r_sel = r[sel] + # fmt: off out[sel] = ( 1 - 5 / 3 * r_sel**2 @@ -101,6 +102,7 @@ def _gaspari_cohn_np(r): + 1 / 2 * r_sel**4 - 1 / 4 * r_sel**5 ) + # fmt: on # compute for 1 <= r < 2 sel = (r >= 1) & (r < 2) diff --git a/scripts/test_install.py b/scripts/test_install.py index 0ff52950..cca0867c 100644 --- a/scripts/test_install.py +++ b/scripts/test_install.py @@ -1,6 +1,7 @@ """Test that all of our modules can be imported Thanks https://stackoverflow.com/a/25562415/10473080 """ + import importlib import pkgutil diff --git a/setup.cfg b/setup.cfg index e7dfb348..bb38dd87 100644 --- a/setup.cfg +++ b/setup.cfg @@ -56,7 +56,7 @@ tests = dev = %(docs)s %(tests)s - black < 23 + black !=23 flake8 isort twine