Skip to content

Commit 75e14ba

Browse files
committed
Apply ruff formatting and exclude notebooks from formatting
1 parent 99ea0df commit 75e14ba

5 files changed

Lines changed: 14 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ notebooks = ["nbformat", "nbconvert", "jupyter", "plotly", "shapely", "seaborn"]
7373
"Bug Tracker" = "https://github.com/DHI/modelskill/issues"
7474

7575

76+
[tool.ruff]
77+
extend-exclude = ["notebooks"]
78+
7679
[tool.ruff.lint]
7780
ignore = ["E501"]
7881
select = ["E4", "E7", "E9", "F", "D200", "D205"]

src/modelskill/comparison/_comparer_plotter.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,14 @@ def taylor(
746746
df = df.rename(columns={"_std_obs": "obs_std", "_std_mod": "std"})
747747

748748
pts = [
749-
TaylorPoint(name=r.model, obs_std=r.obs_std, std=r.std, cc=r.cc, marker=marker, marker_size=marker_size)
749+
TaylorPoint(
750+
name=r.model,
751+
obs_std=r.obs_std,
752+
std=r.std,
753+
cc=r.cc,
754+
marker=marker,
755+
marker_size=marker_size,
756+
)
750757
for r in df.itertuples()
751758
]
752759

tests/integration/test_integration_grid.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pytest
33
import xarray as xr
44

5+
56
def test_extract_point_from_3d():
67
mr = ms.GridModelResult(
78
"tests/testdata/cmems_mod_med_phy-sal_anfc_4.2km-3D_PT1H-m_1705916517624.nc",
@@ -27,4 +28,4 @@ def test_extract_point_from_3d():
2728
sc = cmp.score()
2829

2930
# "Observed" data is extracted from the 3D model result, so the score should be 0.0
30-
assert sc["MedSea"] == pytest.approx(0.0)
31+
assert sc["MedSea"] == pytest.approx(0.0)

tests/model/test_point.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ def test_point_model_result_from_nc_file():
248248

249249

250250
def test_interp_time():
251-
252251
df = pd.DataFrame(
253252
{
254253
"WL": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0],

tests/test_consistency.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Test consitency across input formats and classes"""
2+
23
from functools import partial
34
import pytest
45
import mikeio

0 commit comments

Comments
 (0)