Skip to content

Commit

Permalink
isort pass
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Jun 22, 2020
1 parent 11749b9 commit e9eef27
Show file tree
Hide file tree
Showing 34 changed files with 82 additions and 51 deletions.
5 changes: 3 additions & 2 deletions yt/data_objects/construction_data_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

import numpy as np

from unyt.array import uconcatenate
from unyt.unit_object import Unit

import yt.geometry.particle_deposit as particle_deposit
from yt.config import ytcfg
from yt.data_objects.data_containers import (
Expand All @@ -23,9 +26,7 @@
from yt.frontends.stream.api import load_uniform_grid
from yt.funcs import ensure_list, get_memory_usage, iterable, mylog, only_on_root
from yt.geometry.coordinates.cartesian_coordinates import all_data
from unyt.unit_object import Unit
from yt.units.yt_array import YTArray
from unyt.array import uconcatenate
from yt.utilities.exceptions import (
YTNoAPIKey,
YTParticleDepositionNotImplemented,
Expand Down
2 changes: 1 addition & 1 deletion yt/data_objects/data_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import numpy as np

from unyt.array import uconcatenate
from unyt.exceptions import UnitConversionError, UnitParseError

import yt.geometry.selection_routines
Expand All @@ -27,7 +28,6 @@
)
from yt.geometry.selection_routines import compose_selector
from yt.units.yt_array import YTArray, YTQuantity
from unyt.array import uconcatenate
from yt.utilities.amr_kdtree.api import AMRKDTree
from yt.utilities.exceptions import (
YTBooleanObjectError,
Expand Down
3 changes: 1 addition & 2 deletions yt/data_objects/derived_quantities.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import numpy as np

from yt.funcs import camelcase_to_underscore, ensure_list, array_like_field

from yt.funcs import array_like_field, camelcase_to_underscore, ensure_list
from yt.utilities.exceptions import YTParticleTypeNotFound
from yt.utilities.parallel_tools.parallel_analysis_interface import (
ParallelAnalysisInterface,
Expand Down
3 changes: 2 additions & 1 deletion yt/data_objects/octree_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import numpy as np

from unyt.dimensions import length

import yt.geometry.particle_deposit as particle_deposit
import yt.geometry.particle_smooth as particle_smooth
from yt.data_objects.data_containers import YTSelectionContainer
from yt.funcs import mylog
from yt.geometry.particle_oct_container import ParticleOctreeContainer
from unyt.dimensions import length
from yt.units.yt_array import YTArray
from yt.utilities.exceptions import (
YTFieldTypeNotFound,
Expand Down
2 changes: 1 addition & 1 deletion yt/data_objects/particle_trajectories.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from yt.config import ytcfg
from yt.data_objects.field_data import YTFieldData
from yt.funcs import get_pbar, mylog, array_like_field
from yt.funcs import array_like_field, get_pbar, mylog
from yt.utilities.exceptions import YTIllDefinedParticleData
from yt.utilities.lib.particle_mesh_operations import CICSample_3
from yt.utilities.on_demand_imports import _h5py as h5py
Expand Down
12 changes: 10 additions & 2 deletions yt/data_objects/profiles.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import numpy as np

from unyt.unit_object import Unit

from yt.data_objects.field_data import YTFieldData
from yt.fields.derived_field import DerivedField
from yt.frontends.ytdata.utilities import save_as_dataset
from yt.funcs import ensure_list, get_output_filename, issue_deprecation_warning, iterable, mylog, array_like_field
from unyt.unit_object import Unit
from yt.funcs import (
array_like_field,
ensure_list,
get_output_filename,
issue_deprecation_warning,
iterable,
mylog,
)
from yt.units.yt_array import YTQuantity
from yt.utilities.exceptions import YTIllDefinedBounds, YTIllDefinedProfile, YTProfileDataShape
from yt.utilities.lib.misc_utilities import new_bin_profile1d, new_bin_profile2d, new_bin_profile3d
Expand Down
3 changes: 2 additions & 1 deletion yt/data_objects/selection_data_containers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import numpy as np

from unyt.array import udot, unorm

from yt.data_objects.data_containers import (
YTSelectionContainer,
YTSelectionContainer0D,
Expand All @@ -25,7 +27,6 @@
)
from yt.geometry.selection_routines import points_in_cells
from yt.units.yt_array import YTArray, YTQuantity
from unyt.array import udot, unorm
from yt.utilities.exceptions import (
YTEllipsoidOrdering,
YTException,
Expand Down
6 changes: 3 additions & 3 deletions yt/data_objects/static_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

import numpy as np

from unyt.dimensions import current_mks
from unyt.unit_object import Unit, define_unit

from yt.config import ytcfg
from yt.data_objects.data_containers import data_object_registry
from yt.data_objects.particle_filters import filter_registry
Expand Down Expand Up @@ -37,9 +40,6 @@
SphericalCoordinateHandler,
)
from yt.units import UnitContainer, _wrap_display_ytarray
from yt.units import UnitContainer
from unyt.dimensions import current_mks
from unyt.unit_object import Unit, define_unit
from yt.units.unit_registry import UnitRegistry
from yt.units.unit_systems import create_code_unit_system, unit_system_registry
from yt.units.yt_array import YTArray, YTQuantity
Expand Down
3 changes: 2 additions & 1 deletion yt/fields/derived_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import re
import warnings

from unyt.unit_object import Unit

import yt.units.dimensions as ytdims
from yt.funcs import VisibleDeprecationWarning, ensure_list
from unyt.unit_object import Unit
from yt.utilities.exceptions import YTFieldNotFound

from .field_detector import FieldDetector
Expand Down
6 changes: 3 additions & 3 deletions yt/fields/field_info_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

import numpy as np

from yt.funcs import mylog, only_on_root
from yt.geometry.geometry_handler import is_curvilinear

from unyt.dimensions import dimensionless
from unyt.unit_object import Unit

from yt.funcs import mylog, only_on_root
from yt.geometry.geometry_handler import is_curvilinear
from yt.utilities.exceptions import YTFieldNotFound

from .derived_field import DerivedField, NullFunc, TranslationFunc
Expand Down
3 changes: 2 additions & 1 deletion yt/fields/fluid_fields.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import numpy as np

from unyt.unit_object import Unit

from yt.funcs import mylog
from yt.geometry.geometry_handler import is_curvilinear
from unyt.unit_object import Unit
from yt.utilities.chemical_formulas import default_mu
from yt.utilities.lib.misc_utilities import obtain_relative_velocity_vector

Expand Down
3 changes: 2 additions & 1 deletion yt/fields/magnetic_field.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import numpy as np

from yt.fields.derived_field import ValidateParameter
from unyt import dimensions
from unyt.array import ustack

from yt.fields.derived_field import ValidateParameter
from yt.utilities.math_utils import get_sph_phi_component, get_sph_theta_component

from .field_plugin_registry import register_field_plugin
Expand Down
3 changes: 2 additions & 1 deletion yt/fields/particle_fields.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import numpy as np

from unyt.array import uconcatenate, ucross

from yt.fields.derived_field import ValidateParameter, ValidateSpatial
from yt.fields.field_detector import FieldDetector
from yt.funcs import issue_deprecation_warning
from unyt.array import uconcatenate, ucross
from yt.utilities.lib.misc_utilities import obtain_position_vector, obtain_relative_velocity_vector
from yt.utilities.math_utils import (
get_cyl_r,
Expand Down
3 changes: 2 additions & 1 deletion yt/frontends/chombo/fields.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import numpy as np

from unyt.unit_object import Unit

from yt.fields.field_info_container import (
FieldInfoContainer,
particle_deposition_functions,
particle_vector_functions,
standard_particle_fields,
)
from unyt.unit_object import Unit
from yt.utilities.exceptions import YTFieldNotFound

rho_units = "code_mass / code_length**3"
Expand Down
7 changes: 4 additions & 3 deletions yt/frontends/fits/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
import numpy as np
import numpy.core.defchararray as np_char

from unyt import dimensions
from unyt._unit_lookup_table import default_unit_symbol_lut, unit_prefixes
from unyt.unit_object import UnitParseError

from yt.config import ytcfg
from yt.data_objects.grid_patch import AMRGridPatch
from yt.data_objects.static_output import Dataset
from yt.funcs import ensure_list, issue_deprecation_warning, mylog, setdefaultattr
from yt.geometry.geometry_handler import YTDataChunk
from yt.geometry.grid_geometry_handler import GridIndex
from unyt import dimensions
from unyt._unit_lookup_table import default_unit_symbol_lut, unit_prefixes
from unyt.unit_object import UnitParseError
from yt.units.yt_array import YTQuantity
from yt.utilities.decompose import decompose_array, get_psize
from yt.utilities.file_handler import FITSFileHandler
Expand Down
5 changes: 3 additions & 2 deletions yt/frontends/gdf/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

import numpy as np

from unyt.dimensions import dimensionless as sympy_one
from unyt.unit_object import Unit

from yt.data_objects.grid_patch import AMRGridPatch
from yt.data_objects.static_output import Dataset
from yt.funcs import ensure_tuple, just_one, setdefaultattr
from yt.geometry.grid_geometry_handler import GridIndex
from unyt.dimensions import dimensionless as sympy_one
from unyt.unit_object import Unit
from yt.units.unit_systems import unit_system_registry
from yt.utilities.exceptions import YTGDFUnknownGeometry
from yt.utilities.lib.misc_utilities import get_box_grids_level
Expand Down
3 changes: 2 additions & 1 deletion yt/frontends/halo_catalog/io.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import numpy as np

from yt.funcs import mylog, parse_h5_attr
from unyt.array import uvstack

from yt.funcs import mylog, parse_h5_attr
from yt.utilities.exceptions import YTDomainOverflow
from yt.utilities.io_handler import BaseIOHandler
from yt.utilities.lib.geometry_utils import compute_morton
Expand Down
3 changes: 2 additions & 1 deletion yt/frontends/stream/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import numpy as np

from unyt.array import uconcatenate

from yt.data_objects.field_data import YTFieldData
from yt.data_objects.grid_patch import AMRGridPatch
from yt.data_objects.octree_subset import OctreeSubset
Expand All @@ -25,7 +27,6 @@
from yt.geometry.oct_geometry_handler import OctreeIndex
from yt.geometry.unstructured_mesh_handler import UnstructuredIndex
from yt.units.yt_array import YTQuantity
from unyt.array import uconcatenate
from yt.utilities.decompose import decompose_array, get_psize
from yt.utilities.exceptions import (
YTIllDefinedAMR,
Expand Down
6 changes: 3 additions & 3 deletions yt/frontends/ytdata/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

import numpy as np

from unyt import dimensions
from unyt.array import uconcatenate

from yt.data_objects.data_containers import GenerationInProgress
from yt.data_objects.grid_patch import AMRGridPatch
from yt.data_objects.particle_unions import ParticleUnion
Expand All @@ -19,11 +22,8 @@
from yt.funcs import is_root, parse_h5_attr
from yt.geometry.grid_geometry_handler import GridIndex
from yt.geometry.particle_geometry_handler import ParticleIndex
from unyt import dimensions
from yt.units.unit_registry import UnitRegistry
from unyt.array import uconcatenate
from yt.units.yt_array import YTQuantity
from unyt.array import uconcatenate
from yt.utilities.exceptions import YTFieldTypeNotFound
from yt.utilities.logger import ytLogger as mylog
from yt.utilities.on_demand_imports import _h5py as h5py
Expand Down
3 changes: 2 additions & 1 deletion yt/frontends/ytdata/io.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import numpy as np

from unyt.array import uvstack

from yt.funcs import mylog, parse_h5_attr
from yt.geometry.selection_routines import GridSelector
from unyt.array import uvstack
from yt.utilities.exceptions import YTDomainOverflow
from yt.utilities.io_handler import BaseIOHandler
from yt.utilities.lib.geometry_utils import compute_morton
Expand Down
3 changes: 2 additions & 1 deletion yt/geometry/coordinates/cartesian_coordinates.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import numpy as np

from unyt.array import uconcatenate, uvstack

from yt.data_objects.unstructured_mesh import SemiStructuredMesh
from yt.funcs import mylog
from yt.units.yt_array import YTArray
from unyt.array import uconcatenate, uvstack
from yt.utilities.lib.pixelization_routines import (
interpolate_sph_grid_gather,
normalization_2d_utility,
Expand Down
3 changes: 2 additions & 1 deletion yt/geometry/geometry_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

import numpy as np

from unyt.array import uconcatenate

from yt.config import ytcfg
from yt.funcs import iterable
from yt.units.yt_array import YTArray
from unyt.array import uconcatenate
from yt.utilities.exceptions import YTFieldNotFound
from yt.utilities.io_handler import io_registry
from yt.utilities.logger import ytLogger as mylog
Expand Down
3 changes: 2 additions & 1 deletion yt/units/yt_array.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from unyt.array import *
from unyt.array import unyt_quantity as YTQuantity, unyt_array as YTArray
from unyt.array import unyt_array as YTArray, unyt_quantity as YTQuantity

from yt.funcs import array_like_field
from yt.units import YTArray, YTQuantity

Expand Down
3 changes: 2 additions & 1 deletion yt/utilities/cosmology.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import numpy as np

from yt.funcs import issue_deprecation_warning
from unyt import dimensions
from unyt.unit_object import Unit

from yt.funcs import issue_deprecation_warning
from yt.units.unit_registry import UnitRegistry
from yt.units.yt_array import YTArray, YTQuantity
from yt.utilities.physical_constants import gravitational_constant_cgs as G, speed_of_light_cgs
Expand Down
3 changes: 2 additions & 1 deletion yt/utilities/particle_generator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import numpy as np

from yt.funcs import get_pbar, issue_deprecation_warning
from unyt.array import uconcatenate

from yt.funcs import get_pbar, issue_deprecation_warning
from yt.utilities.lib.particle_mesh_operations import CICSample_3


Expand Down
3 changes: 2 additions & 1 deletion yt/visualization/eps_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import numpy as np
from matplotlib import cm

from unyt.unit_object import Unit

import pyx
from yt.config import ytcfg
from yt.funcs import issue_deprecation_warning
from unyt.unit_object import Unit
from yt.units.yt_array import YTQuantity
from yt.utilities.logger import ytLogger as mylog

Expand Down
5 changes: 3 additions & 2 deletions yt/visualization/fits_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

import numpy as np

from unyt import dimensions
from unyt.unit_object import Unit

from yt.data_objects.construction_data_containers import YTCoveringGrid
from yt.data_objects.image_array import ImageArray
from yt.fields.derived_field import DerivedField
from yt.funcs import ensure_list, fix_axis, issue_deprecation_warning, iterable, mylog
from unyt import dimensions
from unyt.unit_object import Unit
from yt.units.yt_array import YTArray, YTQuantity
from yt.utilities.on_demand_imports import _astropy
from yt.utilities.parallel_tools.parallel_analysis_interface import parallel_root_only
Expand Down
3 changes: 2 additions & 1 deletion yt/visualization/line_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import numpy as np

from yt.funcs import iterable, mylog
from unyt.unit_object import Unit

from yt.funcs import iterable, mylog
from yt.units.yt_array import YTArray
from yt.visualization.base_plot_types import PlotMPL
from yt.visualization.plot_container import (
Expand Down
Loading

0 comments on commit e9eef27

Please sign in to comment.