Skip to content

Commit

Permalink
STY: Update to latest ruff (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
tnatt authored Aug 19, 2024
1 parent 82972cf commit 69aa7dd
Show file tree
Hide file tree
Showing 25 changed files with 34 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/fmu/tools/qcproperties/_aggregate_df.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import numpy as np
import pandas as pd

from fmu.tools._common import _QCCommon
from fmu.tools.qcproperties._utils import list_combinations

Expand Down
1 change: 1 addition & 0 deletions src/fmu/tools/qcproperties/_grid2df.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Optional

import pandas as pd

from fmu.tools._common import _QCCommon
from fmu.tools.qcdata import QCData
from fmu.tools.qcproperties._config_parser import ConfigParser
Expand Down
1 change: 1 addition & 0 deletions src/fmu/tools/qcproperties/_well2df.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Any, List, Optional

import pandas as pd

from fmu.tools._common import _QCCommon
from fmu.tools.qcdata import QCData
from fmu.tools.qcproperties._config_parser import ConfigParser
Expand Down
1 change: 1 addition & 0 deletions src/fmu/tools/qcproperties/qcproperties.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pandas as pd
import yaml

from fmu.tools._common import _QCCommon
from fmu.tools.qcdata import QCData
from fmu.tools.qcproperties._aggregate_df import PropertyAggregation
Expand Down
3 changes: 2 additions & 1 deletion tests/fipmapper/test_disjointsets.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pandas as pd
import pytest
from fmu.tools.fipmapper import fipmapper
from packaging import version

from fmu.tools.fipmapper import fipmapper


@pytest.mark.skipif(
version.parse(pd.__version__) < version.parse("0.25.2"),
Expand Down
1 change: 1 addition & 0 deletions tests/fipmapper/test_fipmapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from fmu.tools.fipmapper import fipmapper


Expand Down
1 change: 1 addition & 0 deletions tests/properties/test_swfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import numpy as np
import pytest
import xtgeo

from fmu.tools.properties import SwFunction

TPATH = Path("../xtgeo-testdata")
Expand Down
1 change: 1 addition & 0 deletions tests/qcforward/test_bw_vs_gridprops.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import pandas as pd
import pytest

from fmu.tools import qcforward as qcf

# filedata
Expand Down
1 change: 1 addition & 0 deletions tests/qcforward/test_grid_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pandas as pd
import pytest

from fmu.tools import qcforward as qcf


Expand Down
3 changes: 2 additions & 1 deletion tests/qcforward/test_gridquality.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

import pathlib

import fmu.tools.qcforward as qcf
import pandas as pd
import pytest

import fmu.tools.qcforward as qcf

# filedata
PATH = pathlib.Path(".").resolve().as_posix()
GRIDFILE = "../xtgeo-testdata/3dgrids/reek/reek_sim_grid.roff"
Expand Down
3 changes: 2 additions & 1 deletion tests/qcforward/test_wellzonation_vs_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

from os.path import abspath

import fmu.tools.qcforward as qcf
import pandas as pd
import pytest

import fmu.tools.qcforward as qcf

ZONENAME = "Zone"
ZONELOGNAME = "Zonelog"
PERFLOGNAME = "PERF"
Expand Down
1 change: 1 addition & 0 deletions tests/qcproperties/test_qcproperties.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pathlib import Path

import pytest

from fmu.tools.qcdata import QCData
from fmu.tools.qcproperties._grid2df import GridProps2df
from fmu.tools.qcproperties._well2df import WellLogs2df
Expand Down
1 change: 1 addition & 0 deletions tests/rms/test_create_rft_ertobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import numpy as np
import pandas as pd
import pytest

from fmu.tools._common import preserve_cwd
from fmu.tools.rms import create_rft_ertobs
from fmu.tools.rms.create_rft_ertobs import check_and_parse_config
Expand Down
3 changes: 2 additions & 1 deletion tests/rms/test_import_localmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import os
import sys

import fmu.tools.rms as toolsrms
import pytest

import fmu.tools.rms as toolsrms
from fmu.tools._common import preserve_cwd

SNIPPET1 = """
Expand Down
1 change: 1 addition & 0 deletions tests/rms/test_rename_rms_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from textwrap import dedent

import pytest

from fmu.tools._common import preserve_cwd
from fmu.tools.rms.rename_rms_scripts import PythonCompMaster, main

Expand Down
1 change: 1 addition & 0 deletions tests/rms/test_rmsvolumetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import pandas as pd
import pytest

from fmu.tools.rms import volumetrics

TESTDIR = Path(__file__).parent / "volumetricsdata"
Expand Down
3 changes: 2 additions & 1 deletion tests/sensitivities/test_calc_tornado.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import pandas as pd
import pytest
from fmu.tools.sensitivities import calc_tornadoinput, summarize_design
from packaging import version

from fmu.tools.sensitivities import calc_tornadoinput, summarize_design

TESTDATA = Path(__file__).parent / "data"


Expand Down
3 changes: 2 additions & 1 deletion tests/sensitivities/test_create_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

import pandas as pd
import pytest
from fmu.tools.sensitivities import DesignMatrix, excel2dict_design
from packaging import version

from fmu.tools.sensitivities import DesignMatrix, excel2dict_design

TESTDATA = Path(__file__).parent / "data"


Expand Down
1 change: 1 addition & 0 deletions tests/sensitivities/test_design_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numbers

import pytest

from fmu.tools.sensitivities import design_distributions as dists

# pylint: disable=protected-access
Expand Down
3 changes: 2 additions & 1 deletion tests/sensitivities/test_designmatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

import pandas as pd
import pytest
from packaging import version

from fmu.tools._common import preserve_cwd
from fmu.tools.sensitivities import DesignMatrix
from packaging import version

TESTDATA = Path(__file__).parent / "data"

Expand Down
3 changes: 2 additions & 1 deletion tests/sensitivities/test_excel2dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
import numpy as np
import pandas as pd
import pytest
from packaging import version

from fmu.tools._common import preserve_cwd
from fmu.tools.sensitivities import excel2dict_design, inputdict_to_yaml
from fmu.tools.sensitivities._excel2dict import _has_value
from packaging import version

MOCK_GENERAL_INPUT = pd.DataFrame(
data=[
Expand Down
3 changes: 2 additions & 1 deletion tests/sensitivities/test_use_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import pandas as pd
import pytest
from packaging import version

from fmu.tools._common import preserve_cwd
from fmu.tools.sensitivities import DesignMatrix, excel2dict_design
from packaging import version


@preserve_cwd
Expand Down
1 change: 1 addition & 0 deletions tests/test_ensembles/test_ensemble_well_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pytest
import xtgeo
import yaml

from fmu.tools._common import preserve_cwd
from fmu.tools.ensembles import ensemble_well_props

Expand Down
1 change: 1 addition & 0 deletions tests/test_extract_zone_tops.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from os.path import abspath

import pytest

from fmu.tools import extract_grid_zone_tops

GRID = abspath("../xtgeo-testdata/3dgrids/reek/reek_sim_grid.roff")
Expand Down
1 change: 1 addition & 0 deletions tests/test_qcdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import pytest
import xtgeo

from fmu.tools.qcdata import QCData

# filedata
Expand Down

0 comments on commit 69aa7dd

Please sign in to comment.