From 45ae6725db5181f63b79a12aac1fd210b499ef85 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:42:54 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- noxfile.py | 1 + src/bluebonnet/flow/__init__.py | 1 + src/bluebonnet/flow/flowproperties.py | 1 + src/bluebonnet/fluids/__init__.py | 1 + src/bluebonnet/fluids/gas.py | 3 ++- src/bluebonnet/fluids/water.py | 12 +++--------- src/bluebonnet/forecast/forecast.py | 1 + src/bluebonnet/forecast/forecast_pressure.py | 1 + src/bluebonnet/plotting.py | 1 + tests/flow/test_properties.py | 1 + tests/flow/test_reservoir.py | 1 + tests/fluids/test_fluid.py | 1 + tests/fluids/test_gas.py | 1 + tests/fluids/test_oil.py | 1 + tests/fluids/test_water.py | 1 + tests/forecast/test_forecast.py | 1 + tests/test_bluebonnet.py | 1 + 17 files changed, 20 insertions(+), 10 deletions(-) diff --git a/noxfile.py b/noxfile.py index a3072da..c9bea91 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,4 +1,5 @@ """Nox sessions for linting, docs, and testing.""" + from __future__ import annotations import argparse diff --git a/src/bluebonnet/flow/__init__.py b/src/bluebonnet/flow/__init__.py index 42f8e83..ea33d2f 100644 --- a/src/bluebonnet/flow/__init__.py +++ b/src/bluebonnet/flow/__init__.py @@ -1,4 +1,5 @@ """Flow, pressure changes, and production from hydraulically fractured reservoirs.""" + from __future__ import annotations from bluebonnet.flow.flowproperties import ( diff --git a/src/bluebonnet/flow/flowproperties.py b/src/bluebonnet/flow/flowproperties.py index a29f3b2..352057d 100644 --- a/src/bluebonnet/flow/flowproperties.py +++ b/src/bluebonnet/flow/flowproperties.py @@ -4,6 +4,7 @@ module includes structures for storing these pressure-dependent properties in order to aid the reservoir simulators in the `reservoir` module. """ + from __future__ import annotations import copy diff --git a/src/bluebonnet/fluids/__init__.py b/src/bluebonnet/fluids/__init__.py index a1a32e5..d886b13 100644 --- a/src/bluebonnet/fluids/__init__.py +++ b/src/bluebonnet/fluids/__init__.py @@ -4,6 +4,7 @@ Uses common empirical correlations to get properties. These include density, saturation pressure, viscosity, and the pseudopressure transform. """ + from __future__ import annotations from bluebonnet.fluids.fluid import Fluid, build_pvt_gas, pseudopressure diff --git a/src/bluebonnet/fluids/gas.py b/src/bluebonnet/fluids/gas.py index 6fca4ea..c83e45b 100644 --- a/src/bluebonnet/fluids/gas.py +++ b/src/bluebonnet/fluids/gas.py @@ -1,4 +1,5 @@ """Gas pvt properties, using Dranchuk and Abou-Kassem's correlations.""" + from __future__ import annotations import math @@ -165,7 +166,7 @@ def z_factor_hallyarbrough(pressure: float, temperature: float) -> float: References ---------- `Hall-Yarbrough estimation `_ - """ # noqa: E501 + """ t = 1 / temperature y = 0.001 fdum = 1 diff --git a/src/bluebonnet/fluids/water.py b/src/bluebonnet/fluids/water.py index 1937363..dab4ee0 100644 --- a/src/bluebonnet/fluids/water.py +++ b/src/bluebonnet/fluids/water.py @@ -1,4 +1,5 @@ """PVT and viscosity for water from the correlations provided by McCain.""" + from __future__ import annotations import numpy as np @@ -150,12 +151,7 @@ def viscosity_water_McCain( >>> viscosity_water_McCain(400, 3000, 15) 0.2627774655403418 """ - A = ( - 109.574 - - 8.40564 * salinity - + 0.313314 * salinity**2 - + 8.72213e-3 * salinity**3 - ) + A = 109.574 - 8.40564 * salinity + 0.313314 * salinity**2 + 8.72213e-3 * salinity**3 B = ( 1.12166 - 2.63951e-2 * salinity @@ -164,8 +160,6 @@ def viscosity_water_McCain( - 1.55586e-6 * salinity**4 ) mu_water = ( - A - * temperature**-B - * (0.9994 + 4.0295e-5 * pressure + 3.1062e-9 * pressure**2) + A * temperature**-B * (0.9994 + 4.0295e-5 * pressure + 3.1062e-9 * pressure**2) ) return mu_water diff --git a/src/bluebonnet/forecast/forecast.py b/src/bluebonnet/forecast/forecast.py index c541aff..2ffe40a 100644 --- a/src/bluebonnet/forecast/forecast.py +++ b/src/bluebonnet/forecast/forecast.py @@ -1,4 +1,5 @@ """Fit and forecast production from hydrofractured reservoirs.""" + from __future__ import annotations from collections.abc import Callable diff --git a/src/bluebonnet/forecast/forecast_pressure.py b/src/bluebonnet/forecast/forecast_pressure.py index cff60e2..1e84837 100644 --- a/src/bluebonnet/forecast/forecast_pressure.py +++ b/src/bluebonnet/forecast/forecast_pressure.py @@ -1,4 +1,5 @@ """Forecast when bottomhole/fracface pressure is known and varying.""" + from __future__ import annotations from typing import Any diff --git a/src/bluebonnet/plotting.py b/src/bluebonnet/plotting.py index 120164e..0cd6490 100644 --- a/src/bluebonnet/plotting.py +++ b/src/bluebonnet/plotting.py @@ -1,4 +1,5 @@ """Ease plotting production and fluid flow information.""" + from __future__ import annotations from typing import Any, Union diff --git a/tests/flow/test_properties.py b/tests/flow/test_properties.py index 5ebe071..fefe08f 100644 --- a/tests/flow/test_properties.py +++ b/tests/flow/test_properties.py @@ -1,4 +1,5 @@ """Define a suite a tests for the flowproperties module.""" + from __future__ import annotations from copy import copy diff --git a/tests/flow/test_reservoir.py b/tests/flow/test_reservoir.py index 7486652..5a33b3a 100644 --- a/tests/flow/test_reservoir.py +++ b/tests/flow/test_reservoir.py @@ -1,4 +1,5 @@ """Define a suite a tests for the reservoir module.""" + from __future__ import annotations from itertools import product diff --git a/tests/fluids/test_fluid.py b/tests/fluids/test_fluid.py index 05156b8..c3d1794 100644 --- a/tests/fluids/test_fluid.py +++ b/tests/fluids/test_fluid.py @@ -1,4 +1,5 @@ """Define a suite a tests for the fluid module.""" + from __future__ import annotations import numpy as np diff --git a/tests/fluids/test_gas.py b/tests/fluids/test_gas.py index c4bd2bc..2f7b01e 100644 --- a/tests/fluids/test_gas.py +++ b/tests/fluids/test_gas.py @@ -1,4 +1,5 @@ """Define a suite a tests for the gas module.""" + from __future__ import annotations import numpy as np diff --git a/tests/fluids/test_oil.py b/tests/fluids/test_oil.py index 8a07333..f4dedf6 100644 --- a/tests/fluids/test_oil.py +++ b/tests/fluids/test_oil.py @@ -1,4 +1,5 @@ """Define a suite a tests for the oil module.""" + from __future__ import annotations import math diff --git a/tests/fluids/test_water.py b/tests/fluids/test_water.py index 24ce2b3..2aed5b0 100644 --- a/tests/fluids/test_water.py +++ b/tests/fluids/test_water.py @@ -1,4 +1,5 @@ """Define a suite a tests for the gas module.""" + from __future__ import annotations import pytest diff --git a/tests/forecast/test_forecast.py b/tests/forecast/test_forecast.py index d5102e4..306420d 100644 --- a/tests/forecast/test_forecast.py +++ b/tests/forecast/test_forecast.py @@ -1,4 +1,5 @@ """Test fitting and forecasting production.""" + from __future__ import annotations import numpy as np diff --git a/tests/test_bluebonnet.py b/tests/test_bluebonnet.py index fcc37a4..c40eb48 100644 --- a/tests/test_bluebonnet.py +++ b/tests/test_bluebonnet.py @@ -1,4 +1,5 @@ """Smoke test that bluebonnet imports.""" + from __future__ import annotations import bluebonnet