From e207ce7a939d730e3b0b4e5bd255fff721b1a2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Berland?= Date: Mon, 5 Feb 2024 13:21:59 +0100 Subject: [PATCH] Blacken with black 24.1 --- res2df/nnc.py | 1 + res2df/rft.py | 6 +++--- res2df/satfunc.py | 1 + res2df/summary.py | 1 + res2df/vfp/__init__.py | 1 + tests/test_grid.py | 1 + tests/test_gruptree.py | 4 ++-- tests/test_inferdims.py | 1 + tests/test_init.py | 1 + tests/test_rft.py | 1 + 10 files changed, 13 insertions(+), 5 deletions(-) diff --git a/res2df/nnc.py b/res2df/nnc.py index 1173b9a68..bbdbddf8f 100644 --- a/res2df/nnc.py +++ b/res2df/nnc.py @@ -2,6 +2,7 @@ Extract non-neighbour connection (NNC) information from reservoir simulator :term:`output files `. """ + import argparse import datetime import logging diff --git a/res2df/rft.py b/res2df/rft.py index 1e5607f11..773f4e5c8 100644 --- a/res2df/rft.py +++ b/res2df/rft.py @@ -271,9 +271,9 @@ def process_seg_topology(seg_data: pd.DataFrame) -> pd.DataFrame: # We also want to flag the segment that is upstream a junction, merged["JUNCTION_downstream"] = False - merged.loc[ - merged[merged["JUNCTION"]]["SEGIDX_upstream"], "JUNCTION_downstream" - ] = True + merged.loc[merged[merged["JUNCTION"]]["SEGIDX_upstream"], "JUNCTION_downstream"] = ( + True + ) return merged diff --git a/res2df/satfunc.py b/res2df/satfunc.py index fc0d61943..83122644c 100644 --- a/res2df/satfunc.py +++ b/res2df/satfunc.py @@ -12,6 +12,7 @@ TABDIMS or to supply the satnumcount directly to avoid possible bugs. """ + import argparse import logging from pathlib import Path diff --git a/res2df/summary.py b/res2df/summary.py index 47086a78a..33ade0072 100644 --- a/res2df/summary.py +++ b/res2df/summary.py @@ -1,4 +1,5 @@ """Provide a two-way Pandas DataFrame interface to Eclipse summary data (UNSMRY)""" + import argparse import ctypes diff --git a/res2df/vfp/__init__.py b/res2df/vfp/__init__.py index 4fd957cbf..d461c08a6 100644 --- a/res2df/vfp/__init__.py +++ b/res2df/vfp/__init__.py @@ -1,6 +1,7 @@ """ Module with interface for res2df to VFPPROD and VFPINJ keywords in Eclipse. """ + from ._vfp import ( # noqa F:401 basic_data, basic_data2df, diff --git a/tests/test_grid.py b/tests/test_grid.py index 456d646b3..345b14b35 100644 --- a/tests/test_grid.py +++ b/tests/test_grid.py @@ -1,4 +1,5 @@ """Test module for res2df.grid""" + import datetime import os from pathlib import Path diff --git a/tests/test_gruptree.py b/tests/test_gruptree.py index a090d2639..34847db01 100644 --- a/tests/test_gruptree.py +++ b/tests/test_gruptree.py @@ -301,7 +301,7 @@ def test_dict2treelib_deprecated(): FIELDB └── OPX """, - ) + ), # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ], ) @@ -378,7 +378,7 @@ def test_multiple_roots(): pytest.param( pd.DataFrame([{"PARENT": "A"}]), [{}], - marks=pytest.mark.xfail(raises=KeyError) + marks=pytest.mark.xfail(raises=KeyError), # "CHILD" is also required ), (pd.DataFrame([{"PARENT": "A", "CHILD": "B"}]), [{"A": {"B": {}}}]), diff --git a/tests/test_inferdims.py b/tests/test_inferdims.py index 85288ca4b..db544b749 100644 --- a/tests/test_inferdims.py +++ b/tests/test_inferdims.py @@ -1,4 +1,5 @@ """Test module for satfunc2df""" + import re import pytest diff --git a/tests/test_init.py b/tests/test_init.py index d1c197708..047131d97 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -1,4 +1,5 @@ """Check that res2df's submodules are always imported""" + import sys # This file tests what happens when we do this import: diff --git a/tests/test_rft.py b/tests/test_rft.py index d73cd37a2..5ed0f25b0 100644 --- a/tests/test_rft.py +++ b/tests/test_rft.py @@ -1,4 +1,5 @@ """Test module for rft""" + import datetime import os import random