Skip to content

Commit

Permalink
CLN: Lint with isort
Browse files Browse the repository at this point in the history
  • Loading branch information
mferrera committed Oct 2, 2023
1 parent 827960c commit d5f9a5a
Show file tree
Hide file tree
Showing 59 changed files with 92 additions and 49 deletions.
12 changes: 4 additions & 8 deletions src/xtgeo/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
"""The XTGeo common package"""


# flake8: noqa
from xtgeo.common.xtgeo_dialog import XTGeoDialog
from xtgeo.common.xtgeo_dialog import XTGDescription
from xtgeo.common.xtgeo_dialog import XTGShowProgress

from xtgeo.common.sys import _XTGeoFile
from xtgeo.common.sys import inherit_docstring

from xtgeo.common.exceptions import WellNotFoundError
from xtgeo.common.sys import _XTGeoFile, inherit_docstring

# flake8: noqa
from xtgeo.common.xtgeo_dialog import XTGDescription, XTGeoDialog, XTGShowProgress
4 changes: 3 additions & 1 deletion src/xtgeo/cube/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
"""The XTGeo cube package."""

from xtgeo.cube.cube1 import Cube # type: ignore # noqa # pylint: disable=undefined-variable
from xtgeo.cube.cube1 import ( # type: ignore # noqa # pylint: disable=undefined-variable
Cube,
)
6 changes: 3 additions & 3 deletions src/xtgeo/cube/_cube_export.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""Export Cube data via SegyIO library or XTGeo CLIB."""
import json
import shutil
import struct
import json
import numpy as np

import numpy as np
import segyio

import xtgeo
import xtgeo.cxtgeo._cxtgeo as _cxtgeo
from xtgeo.common import XTGeoDialog
from xtgeo import XTGeoCLibError
from xtgeo.common import XTGeoDialog

xtg = XTGeoDialog()

Expand Down
2 changes: 1 addition & 1 deletion src/xtgeo/grid3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

from ._ecl_grid import GridRelative, Units
from .grid import Grid
from .grid_property import GridProperty
from .grid_properties import GridProperties
from .grid_property import GridProperty
2 changes: 1 addition & 1 deletion src/xtgeo/grid3d/_grid3d_fence.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import numpy as np

import xtgeo
import xtgeo.cxtgeo._cxtgeo as _cxtgeo
from xtgeo.grid3d import _gridprop_lowlevel as gl
from xtgeo.surface import _regsurf_lowlevel as rl
import xtgeo.cxtgeo._cxtgeo as _cxtgeo

xtg = xtgeo.common.XTGeoDialog()
logger = xtg.functionlogger(__name__)
Expand Down
3 changes: 2 additions & 1 deletion src/xtgeo/grid3d/_grid_etc1.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

from collections import OrderedDict
from copy import deepcopy
from packaging.version import parse as versionparse
from math import atan2, degrees
from typing import Tuple

import numpy as np
import numpy.ma as ma
import pandas as pd
from packaging.version import parse as versionparse

import xtgeo
import xtgeo.cxtgeo._cxtgeo as _cxtgeo
from xtgeo.common import XTGeoDialog
Expand Down
3 changes: 2 additions & 1 deletion src/xtgeo/grid3d/_grid_refine.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
"""Private module for refinement of a grid."""
from collections import OrderedDict

import numpy as np

from xtgeo.common import XTGeoDialog
import xtgeo.cxtgeo._cxtgeo as _cxtgeo
from xtgeo.common import XTGeoDialog

xtg = XTGeoDialog()

Expand Down
1 change: 1 addition & 0 deletions src/xtgeo/grid3d/_grid_wellzone.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Private module for grid vs well zonelog checks."""

import numpy as np

import xtgeo

xtg = xtgeo.common.XTGeoDialog()
Expand Down
1 change: 1 addition & 0 deletions src/xtgeo/grid3d/_gridprop_import_roff.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import warnings

import numpy as np

import xtgeo

from ._roff_parameter import RoffParameter
Expand Down
2 changes: 1 addition & 1 deletion src/xtgeo/grid3d/_gridprop_op1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import numpy as np

import xtgeo
import xtgeo.cxtgeo._cxtgeo as _cxtgeo
from xtgeo.common import XTGeoDialog
from xtgeo.grid3d import _gridprop_lowlevel as gl
import xtgeo.cxtgeo._cxtgeo as _cxtgeo

xtg = XTGeoDialog()

Expand Down
3 changes: 2 additions & 1 deletion src/xtgeo/grid3d/_gridprops_import_eclrun.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from copy import deepcopy
from typing import List, Tuple, Union

import xtgeo
from typing_extensions import Literal

import xtgeo
from xtgeo.common.constants import MAXKEYWORDS

from . import _grid3d_utils as utils
Expand Down
3 changes: 1 addition & 2 deletions src/xtgeo/metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
# flake8: noqa
"""XTGeo metadata package."""

from xtgeo.metadata.metadata import MetaDataRegularSurface
from xtgeo.metadata.metadata import MetaDataRegularCube
from xtgeo.metadata.metadata import MetaDataRegularCube, MetaDataRegularSurface
3 changes: 2 additions & 1 deletion src/xtgeo/plot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"""The XTGeo plot package"""


from xtgeo.plot.grid3d_slice import Grid3DSlice

# flake8: noqa
from xtgeo.plot.xsection import XSection
from xtgeo.plot.xtmap import Map
from xtgeo.plot.grid3d_slice import Grid3DSlice

# from ._colortables import random, random40, xtgeocolors, colorsfromfile
5 changes: 3 additions & 2 deletions src/xtgeo/plot/xtmap.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
"""Module for map plots of surfaces, using matplotlib."""


import matplotlib.pyplot as plt
import matplotlib.patches as mplp
from matplotlib import ticker
import matplotlib.pyplot as plt
import numpy as np
import numpy.ma as ma
from matplotlib import ticker

from xtgeo.common import XTGeoDialog

from .baseplot import BasePlot

xtg = XTGeoDialog()
Expand Down
1 change: 1 addition & 0 deletions src/xtgeo/surface/_regsurf_cube_window_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@


import numpy as np

import xtgeo
import xtgeo.cxtgeo._cxtgeo as _cxtgeo
from xtgeo.common import XTGeoDialog
Expand Down
1 change: 1 addition & 0 deletions src/xtgeo/surface/_regsurf_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import h5py
import numpy as np
import numpy.ma as ma

import xtgeo
import xtgeo.common.sys as xsys
import xtgeo.cxtgeo._cxtgeo as _cxtgeo # pylint: disable=no-name-in-module
Expand Down
6 changes: 3 additions & 3 deletions src/xtgeo/well/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"""The XTGeo well package"""


from .blocked_well import BlockedWell
from .blocked_wells import BlockedWells

# flake8: noqa
from .well1 import Well
from .wells import Wells

from .blocked_well import BlockedWell
from .blocked_wells import BlockedWells
2 changes: 1 addition & 1 deletion src/xtgeo/well/_blockedwell_roxapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import pandas as pd

from xtgeo.common import XTGeoDialog
from xtgeo.roxutils import RoxUtils
from xtgeo.common.exceptions import WellNotFoundError
from xtgeo.roxutils import RoxUtils

try:
import roxar
Expand Down
1 change: 1 addition & 0 deletions src/xtgeo/well/_blockedwells_roxapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from xtgeo.common import XTGeoDialog
from xtgeo.roxutils import RoxUtils

from .blocked_well import BlockedWell

xtg = XTGeoDialog()
Expand Down
3 changes: 2 additions & 1 deletion src/xtgeo/well/_wellmarkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@


from collections import OrderedDict

import numpy as np
import pandas as pd

import xtgeo
import xtgeo.common.constants as const
import xtgeo.cxtgeo._cxtgeo as _cxtgeo
from xtgeo.common import XTGeoDialog
import xtgeo.common.constants as const

xtg = XTGeoDialog()
logger = xtg.functionlogger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions src/xtgeo/well/_wells_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@


import logging

import numpy as np
import pandas as pd
import shapely.geometry as sg

from xtgeo.common import XTGeoDialog
from xtgeo.common import XTGShowProgress
from xtgeo.common import XTGeoDialog, XTGShowProgress

logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
Expand Down
3 changes: 2 additions & 1 deletion src/xtgeo/xyz/_xyz_lowlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@


import numpy as np
from xtgeo.common import XTGeoDialog

import xtgeo.cxtgeo._cxtgeo as _cxtgeo
from xtgeo.common import XTGeoDialog

xtg = XTGeoDialog()

Expand Down
3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
"""Conftest functions"""
from packaging.version import parse as versionparse

import pandas as pd
import pytest
from packaging.version import parse as versionparse


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

import numpy as np
import pytest

import xtgeo
import xtgeo.common.calc as xcalc
import xtgeo.cxtgeo._cxtgeo as _cxtgeo
Expand Down
3 changes: 2 additions & 1 deletion tests/test_cube/test_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import numpy as np
import pytest
import segyio
import xtgeo
from hypothesis import HealthCheck, given, settings

import xtgeo
from xtgeo.common import XTGeoDialog
from xtgeo.cube import Cube
from xtgeo.cube._cube_import import (
Expand Down
1 change: 1 addition & 0 deletions tests/test_cube/test_cube_deprecations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

import xtgeo


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

import numpy as np
import pytest

import xtgeo
from xtgeo.common import XTGeoDialog
from xtgeo.surface import RegularSurface
Expand Down
1 change: 1 addition & 0 deletions tests/test_grid3d/eclrun_fixtures.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from os.path import join

import pytest

import xtgeo


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

from xtgeo.grid3d._ecl_inte_head import InteHead, Phases
from xtgeo.grid3d._ecl_output_file import Simulator, TypeOfGrid, UnitSystem

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

import numpy as np
import pytest

import xtgeo

# pylint: disable=wildcard-import, unused-wildcard-import
Expand Down
3 changes: 2 additions & 1 deletion tests/test_grid3d/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

import numpy as np
import pytest
import xtgeo
from hypothesis import given

import xtgeo
from xtgeo.common import XTGeoDialog
from xtgeo.grid3d import Grid

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

import numpy as np

import xtgeo
from xtgeo.common import XTGeoDialog

Expand Down
5 changes: 3 additions & 2 deletions tests/test_grid3d/test_grid_ecl_grid.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import hypothesis.strategies as st
import numpy as np
import pytest
from hypothesis import HealthCheck, assume, given, settings
from numpy.testing import assert_allclose

import xtgeo
import xtgeo.grid3d._egrid as xtg_egrid
import xtgeo.grid3d._grdecl_grid as ggrid
from hypothesis import HealthCheck, assume, given, settings
from numpy.testing import assert_allclose
from xtgeo.grid3d._ecl_grid import (
inverse_transform_xtgeo_coord_by_mapaxes,
transform_xtgeo_coord_by_mapaxes,
Expand Down
3 changes: 2 additions & 1 deletion tests/test_grid3d/test_grid_egrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
import hypothesis.strategies as st
import numpy as np
import pytest
from hypothesis import HealthCheck, assume, given, settings

import xtgeo as xtg
import xtgeo.grid3d._egrid as xtge
from hypothesis import HealthCheck, assume, given, settings

from .egrid_generator import (
egrids,
Expand Down
3 changes: 2 additions & 1 deletion tests/test_grid3d/test_grid_grdecl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
import hypothesis.strategies as st
import numpy as np
import pytest
from hypothesis import HealthCheck, assume, given, settings

import xtgeo
import xtgeo.grid3d._ecl_grid as ecl_grid
import xtgeo.grid3d._grdecl_grid as ggrid
from hypothesis import HealthCheck, assume, given, settings
from xtgeo.grid3d import Grid
from xtgeo.grid3d._grdecl_format import open_grdecl
from xtgeo.grid3d._grid_import_ecl import grid_from_ecl_grid
Expand Down
3 changes: 2 additions & 1 deletion tests/test_grid3d/test_grid_property_grdecl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import hypothesis.strategies as st
import numpy as np
import pytest
import xtgeo
from hypothesis import HealthCheck, assume, given, settings
from numpy.testing import assert_allclose

import xtgeo
from xtgeo.grid3d._gridprop_import_grdecl import read_grdecl_3d_property

from .grid_generator import xtgeo_grids as grids
Expand Down
1 change: 1 addition & 0 deletions tests/test_grid3d/test_grid_vs_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import pandas as pd
import pytest

import xtgeo

xtg = xtgeo.common.XTGeoDialog()
Expand Down
Loading

0 comments on commit d5f9a5a

Please sign in to comment.