Skip to content

Commit

Permalink
Lint with ruff 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mferrera committed Jun 28, 2024
1 parent dab68e7 commit c0667d0
Show file tree
Hide file tree
Showing 23 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/make_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path

import matplotlib.pyplot as plt

from pyscal import GasOil, GasWater, WaterOil

IMG_DIR = Path(__file__).absolute().parent / "images"
Expand Down
1 change: 1 addition & 0 deletions tests/test_estimateendpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import hypothesis.strategies as st
import numpy as np
from hypothesis import given

from pyscal import GasOil, WaterOil
from pyscal.constants import EPSILON as epsilon

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

from pyscal import (
GasOil,
GasWater,
Expand Down
1 change: 1 addition & 0 deletions tests/test_fromtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pandas as pd
import pytest
from hypothesis import given

from pyscal import GasOil, WaterOil, WaterOilGas
from pyscal.utils.testing import check_table, float_df_checker

Expand Down
1 change: 1 addition & 0 deletions tests/test_gasoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import pandas as pd
import pytest
from hypothesis import given

from pyscal import GasOil
from pyscal.constants import MAX_EXPONENT_KR, SWINTEGERS
from pyscal.utils.relperm import truncate_zeroness
Expand Down
1 change: 1 addition & 0 deletions tests/test_gaswater.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import numpy as np
import pytest
from hypothesis import given

from pyscal import GasWater
from pyscal.constants import SWINTEGERS
from pyscal.utils.testing import (
Expand Down
1 change: 1 addition & 0 deletions tests/test_interactive_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import numpy as np
import pytest
from matplotlib import pyplot

from pyscal import GasOil, GasWater, PyscalFactory, WaterOil, utils

from .test_scalrecommendation import BASE_SAMPLE_LET, HIGH_SAMPLE_LET, LOW_SAMPLE_LET
Expand Down
3 changes: 2 additions & 1 deletion tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
import sys
from pathlib import Path

import pyscal
import pytest

import pyscal
from pyscal import pyscalcli


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

import matplotlib.pyplot as plt
import pytest

from pyscal import GasOil, GasWater, PyscalList, WaterOil, WaterOilGas, plotting


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

import pandas as pd
import pytest

from pyscal import pyscalcli
from pyscal.utils.testing import sat_table_str_ok

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

from pyscal import (
GasOil,
GasWater,
Expand Down
1 change: 1 addition & 0 deletions tests/test_scalrecommendation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import pandas as pd
import pytest
from hypothesis import given

from pyscal import GasWater, PyscalFactory, SCALrecommendation, WaterOil, WaterOilGas
from pyscal.factory import slicedict
from pyscal.utils.testing import check_table, sat_table_str_ok, slow_hypothesis
Expand Down
1 change: 1 addition & 0 deletions tests/test_slgof.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
import pytest
from hypothesis import given

from pyscal import GasOil, WaterOilGas
from pyscal.constants import EPSILON, SWINTEGERS
from pyscal.utils.testing import sat_table_str_ok
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils_capillarypressure.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import numpy as np
import pytest
from hypothesis import given

from pyscal.constants import EPSILON
from pyscal.utils import capillarypressure

Expand Down
1 change: 1 addition & 0 deletions tests/test_utils_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import pytest
from hypothesis import given
from matplotlib import pyplot as plt

from pyscal import GasOil, WaterOil
from pyscal.constants import EPSILON as epsilon
from pyscal.utils.interpolation import (
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils_monotonicity.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import numpy as np
import pandas as pd
import pytest

from pyscal.utils.monotonicity import (
check_almost_monotone,
check_limits,
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils_relperm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
import pandas as pd
import pytest

from pyscal.utils.relperm import crosspoint, estimate_diffjumppoint, truncate_zeroness

# pyscal.utils.relperm.crosspoint() is also tested in test_wateroil and test_gasoil.
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils_string.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test module for pyscal.utils"""

import pandas as pd

from pyscal.utils.string import comment_formatter, df2str


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

import pandas as pd
import pytest

from pyscal.utils.testing import float_df_checker, sat_table_str_ok


Expand Down
1 change: 1 addition & 0 deletions tests/test_wateroil.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import pandas as pd
import pytest
from hypothesis import given

from pyscal import WaterOil
from pyscal.constants import SWINTEGERS
from pyscal.utils.testing import (
Expand Down
1 change: 1 addition & 0 deletions tests/test_wateroil_pc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
import pytest
from hypothesis import given

from pyscal import WaterOil
from pyscal.constants import MAX_EXPONENT_PC
from pyscal.utils.testing import check_table, float_df_checker, sat_table_str_ok
Expand Down
1 change: 1 addition & 0 deletions tests/test_wateroil_saturation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import hypothesis.strategies as st
from hypothesis import given

from pyscal import WaterOil
from pyscal.constants import EPSILON, SWINTEGERS
from pyscal.utils.testing import check_table, float_df_checker
Expand Down
1 change: 1 addition & 0 deletions tests/test_wateroilgas.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import Path

import pytest

from pyscal import GasOil, WaterOil, WaterOilGas
from pyscal.utils.testing import sat_table_str_ok

Expand Down

0 comments on commit c0667d0

Please sign in to comment.