From 0ec934073a59c5b6387f044b50ba369202129a29 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Mon, 21 Nov 2016 15:53:05 -0700 Subject: [PATCH] MNT: Standardize import ordering --- metpy/calc/basic.py | 5 ++-- metpy/calc/kinematics.py | 4 +++- metpy/calc/tests/test_basic.py | 5 ++-- metpy/calc/tests/test_kinematics.py | 7 +++--- metpy/calc/tests/test_thermo.py | 3 ++- metpy/calc/tests/test_tools.py | 3 +-- metpy/calc/tests/test_turbulence.py | 3 ++- metpy/calc/thermo.py | 4 +++- metpy/calc/turbulence.py | 1 + metpy/cbook.py | 6 ++--- metpy/constants.py | 9 ++++---- metpy/gridding/gridding_functions.py | 5 +--- metpy/gridding/interpolation.py | 8 +++---- metpy/gridding/points.py | 5 ++-- .../gridding/tests/test_gridding_functions.py | 17 +++++--------- metpy/gridding/tests/test_interpolation.py | 23 ++++++++----------- metpy/gridding/tests/test_points.py | 9 ++++---- metpy/gridding/tests/test_polygons.py | 7 +++--- metpy/gridding/tests/test_triangles.py | 14 +++++------ metpy/io/gini.py | 7 +++--- metpy/io/nexrad.py | 8 ++++--- metpy/io/tests/test_gini.py | 4 ++-- metpy/io/tests/test_nexrad.py | 5 ++-- metpy/io/tests/test_upperair.py | 2 +- metpy/io/tools.py | 5 ++-- metpy/io/upperair.py | 2 +- metpy/plots/ctables.py | 2 ++ metpy/plots/skewt.py | 14 +++++------ metpy/plots/station_plot.py | 4 ++-- metpy/plots/tests/test_ctables.py | 1 + metpy/plots/tests/test_skewt.py | 2 +- metpy/plots/tests/test_station_plot.py | 4 ++-- metpy/plots/util.py | 2 +- metpy/plots/wx_symbols.py | 2 +- metpy/testing.py | 3 ++- metpy/units.py | 1 + setup.cfg | 1 + setup.py | 4 +++- 38 files changed, 104 insertions(+), 107 deletions(-) diff --git a/metpy/calc/basic.py b/metpy/calc/basic.py index 15a0b92f853..0cb95c009ff 100644 --- a/metpy/calc/basic.py +++ b/metpy/calc/basic.py @@ -3,13 +3,14 @@ # SPDX-License-Identifier: BSD-3-Clause from __future__ import division + import numpy as np from numpy.ma import masked_array -from ..constants import g, Rd, omega + +from ..constants import g, omega, Rd from ..package_tools import Exporter from ..units import atleast_1d, units - exporter = Exporter(globals()) diff --git a/metpy/calc/kinematics.py b/metpy/calc/kinematics.py index 6a4de55cc6f..5dceca22843 100644 --- a/metpy/calc/kinematics.py +++ b/metpy/calc/kinematics.py @@ -3,9 +3,11 @@ # SPDX-License-Identifier: BSD-3-Clause from __future__ import division + import numpy as np -from ..package_tools import Exporter + from ..constants import g +from ..package_tools import Exporter from ..units import atleast_2d, concatenate, units exporter = Exporter(globals()) diff --git a/metpy/calc/tests/test_basic.py b/metpy/calc/tests/test_basic.py index 2bc9250cad6..ac78c88bdee 100644 --- a/metpy/calc/tests/test_basic.py +++ b/metpy/calc/tests/test_basic.py @@ -3,11 +3,10 @@ # SPDX-License-Identifier: BSD-3-Clause import numpy as np -from numpy.testing import assert_array_equal -from metpy.units import units -from metpy.testing import assert_almost_equal, assert_array_almost_equal from metpy.calc.basic import * # noqa: F403 +from metpy.testing import assert_almost_equal, assert_array_almost_equal, assert_array_equal +from metpy.units import units def test_wind_comps_basic(): diff --git a/metpy/calc/tests/test_kinematics.py b/metpy/calc/tests/test_kinematics.py index d6c0ea76a3c..c2fe21e3276 100644 --- a/metpy/calc/tests/test_kinematics.py +++ b/metpy/calc/tests/test_kinematics.py @@ -2,11 +2,12 @@ # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause -from metpy.testing import assert_array_equal, assert_almost_equal import numpy as np + from metpy.calc.kinematics import * # noqa: F403 -from metpy.constants import g, Re, omega -from metpy.units import units, concatenate +from metpy.constants import g, omega, Re +from metpy.testing import assert_almost_equal, assert_array_equal +from metpy.units import concatenate, units class TestGradients(object): diff --git a/metpy/calc/tests/test_thermo.py b/metpy/calc/tests/test_thermo.py index 031999d9a4a..bf439102487 100644 --- a/metpy/calc/tests/test_thermo.py +++ b/metpy/calc/tests/test_thermo.py @@ -3,9 +3,10 @@ # SPDX-License-Identifier: BSD-3-Clause import numpy as np + from metpy.calc.thermo import * # noqa: F403 -from metpy.units import units from metpy.testing import assert_almost_equal, assert_array_almost_equal +from metpy.units import units def test_potential_temperature(): diff --git a/metpy/calc/tests/test_tools.py b/metpy/calc/tests/test_tools.py index 17fcc3b01a8..5b97ae7fd8d 100644 --- a/metpy/calc/tests/test_tools.py +++ b/metpy/calc/tests/test_tools.py @@ -3,10 +3,9 @@ # SPDX-License-Identifier: BSD-3-Clause import numpy as np -from numpy.testing import assert_array_equal -from metpy.testing import assert_array_almost_equal from metpy.calc.tools import * # noqa: F403 +from metpy.testing import assert_array_almost_equal, assert_array_equal def test_resample_nn(): diff --git a/metpy/calc/tests/test_turbulence.py b/metpy/calc/tests/test_turbulence.py index 7a601794faa..449217d9080 100644 --- a/metpy/calc/tests/test_turbulence.py +++ b/metpy/calc/tests/test_turbulence.py @@ -3,7 +3,8 @@ # SPDX-License-Identifier: BSD-3-Clause import numpy as np -from numpy.testing import assert_array_equal, assert_almost_equal +from numpy.testing import assert_almost_equal, assert_array_equal + from metpy.calc.turbulence import * # noqa: F403 diff --git a/metpy/calc/thermo.py b/metpy/calc/thermo.py index f5c2bac0af2..b1d3f47327b 100644 --- a/metpy/calc/thermo.py +++ b/metpy/calc/thermo.py @@ -3,11 +3,13 @@ # SPDX-License-Identifier: BSD-3-Clause from __future__ import division + import numpy as np import scipy.integrate as si + from .tools import find_intersections +from ..constants import Cp_d, epsilon, kappa, Lv, P0, Rd from ..package_tools import Exporter -from ..constants import epsilon, kappa, P0, Rd, Lv, Cp_d from ..units import atleast_1d, concatenate, units exporter = Exporter(globals()) diff --git a/metpy/calc/turbulence.py b/metpy/calc/turbulence.py index 52b82a32c6e..277c233d7ba 100644 --- a/metpy/calc/turbulence.py +++ b/metpy/calc/turbulence.py @@ -5,6 +5,7 @@ """ import numpy as np + from ..package_tools import Exporter exporter = Exporter(globals()) diff --git a/metpy/cbook.py b/metpy/cbook.py index 1bd5630203a..ede78d87d5b 100644 --- a/metpy/cbook.py +++ b/metpy/cbook.py @@ -1,12 +1,12 @@ -'''Collection of generally useful utility code from the cookbook''' - # Copyright (c) 2008-2015 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause +'''Collection of generally useful utility code from the cookbook''' import os import os.path -from matplotlib.cbook import iterable, is_string_like, Bunch + +from matplotlib.cbook import Bunch, is_string_like, iterable def get_test_data(fname, as_file_obj=True): diff --git a/metpy/constants.py b/metpy/constants.py index 3c30fe2a640..97df114afa5 100644 --- a/metpy/constants.py +++ b/metpy/constants.py @@ -1,3 +1,6 @@ +# Copyright (c) 2008-2015 MetPy Developers. +# Distributed under the terms of the BSD 3-Clause License. +# SPDX-License-Identifier: BSD-3-Clause r''' This is a collection of meteorologically significant constants. @@ -67,12 +70,8 @@ ======================== ======= ======== ===================================== ''' -# Copyright (c) 2008-2015 MetPy Developers. -# Distributed under the terms of the BSD 3-Clause License. -# SPDX-License-Identifier: BSD-3-Clause - -from .units import units from .package_tools import Exporter +from .units import units exporter = Exporter(globals()) diff --git a/metpy/gridding/gridding_functions.py b/metpy/gridding/gridding_functions.py index ba961e87e71..0786cafe03a 100644 --- a/metpy/gridding/gridding_functions.py +++ b/metpy/gridding/gridding_functions.py @@ -5,13 +5,10 @@ from __future__ import division import numpy as np - from scipy.interpolate import griddata, Rbf from scipy.spatial.distance import cdist -from metpy.gridding import interpolation -from metpy.gridding import points - +from . import interpolation, points from ..package_tools import Exporter exporter = Exporter(globals()) diff --git a/metpy/gridding/interpolation.py b/metpy/gridding/interpolation.py index 50beb18fa7a..eb981781d8c 100644 --- a/metpy/gridding/interpolation.py +++ b/metpy/gridding/interpolation.py @@ -4,14 +4,12 @@ from __future__ import division -import numpy as np - import warnings -from scipy.spatial import Delaunay, ConvexHull, cKDTree, qhull - -from metpy.gridding import triangles, polygons, points +import numpy as np +from scipy.spatial import cKDTree, ConvexHull, Delaunay, qhull +from . import points, polygons, triangles from ..package_tools import Exporter exporter = Exporter(globals()) diff --git a/metpy/gridding/points.py b/metpy/gridding/points.py index 9a209f30706..189e1d60f95 100644 --- a/metpy/gridding/points.py +++ b/metpy/gridding/points.py @@ -4,12 +4,11 @@ from __future__ import division -import numpy as np +import warnings +import numpy as np from scipy.spatial import cKDTree -import warnings - def get_points_within_r(center_points, target_points, r, return_idx=False): r"""Get all target_points within a specified radius diff --git a/metpy/gridding/tests/test_gridding_functions.py b/metpy/gridding/tests/test_gridding_functions.py index 1ac29230939..73fecfa8bc0 100644 --- a/metpy/gridding/tests/test_gridding_functions.py +++ b/metpy/gridding/tests/test_gridding_functions.py @@ -4,21 +4,16 @@ from __future__ import division -import pytest - -from metpy.gridding.gridding_functions import (calc_kappa, - remove_observations_below_value, - remove_nan_observations, - remove_repeat_coordinates, - interpolate) - import numpy as np - +from numpy.testing import assert_almost_equal, assert_array_almost_equal +import pytest from scipy.spatial.distance import cdist -from numpy.testing import assert_array_almost_equal, assert_almost_equal - from metpy.cbook import get_test_data +from metpy.gridding.gridding_functions import (calc_kappa, interpolate, + remove_nan_observations, + remove_observations_below_value, + remove_repeat_coordinates) @pytest.fixture() diff --git a/metpy/gridding/tests/test_interpolation.py b/metpy/gridding/tests/test_interpolation.py index c9a071d85bc..12b7eb53f44 100644 --- a/metpy/gridding/tests/test_interpolation.py +++ b/metpy/gridding/tests/test_interpolation.py @@ -4,24 +4,19 @@ from __future__ import division +import numpy as np +from numpy.testing import assert_almost_equal, assert_array_almost_equal import pytest - -from metpy.gridding.interpolation import (barnes_weights, nn_point, cressman_weights, - cressman_point, barnes_point, natural_neighbor, - inverse_distance) - -from metpy.gridding.triangles import find_natural_neighbors, dist_2 -from metpy.gridding.gridding_functions import calc_kappa -from metpy.cbook import get_test_data from scipy.spatial import cKDTree, Delaunay - -import numpy as np - -from numpy.testing import assert_array_almost_equal -from numpy.testing import assert_almost_equal - from scipy.spatial.distance import cdist +from metpy.cbook import get_test_data +from metpy.gridding.gridding_functions import calc_kappa +from metpy.gridding.interpolation import (barnes_point, barnes_weights, cressman_point, + cressman_weights, inverse_distance, + natural_neighbor, nn_point) +from metpy.gridding.triangles import dist_2, find_natural_neighbors + @pytest.fixture() def test_data(): diff --git a/metpy/gridding/tests/test_points.py b/metpy/gridding/tests/test_points.py index 1a3285dc613..55c3b19ae31 100644 --- a/metpy/gridding/tests/test_points.py +++ b/metpy/gridding/tests/test_points.py @@ -4,13 +4,12 @@ from __future__ import division -from metpy.gridding.points import (get_points_within_r, get_point_count_within_r, - get_boundary_coords, get_xy_steps, get_xy_range, - generate_grid, generate_grid_coords) - +import numpy as np from numpy.testing import assert_array_almost_equal -import numpy as np +from metpy.gridding.points import (generate_grid, generate_grid_coords, get_boundary_coords, + get_point_count_within_r, get_points_within_r, + get_xy_range, get_xy_steps) def test_get_points_within_r(): diff --git a/metpy/gridding/tests/test_polygons.py b/metpy/gridding/tests/test_polygons.py index faee9c7cfff..caf9d68b755 100644 --- a/metpy/gridding/tests/test_polygons.py +++ b/metpy/gridding/tests/test_polygons.py @@ -4,10 +4,9 @@ from __future__ import division -from metpy.gridding.polygons import (area, order_edges) +from numpy.testing import assert_almost_equal, assert_array_equal -from numpy import isclose -from numpy.testing import assert_array_equal +from metpy.gridding.polygons import (area, order_edges) def test_area(): @@ -19,7 +18,7 @@ def test_area(): truth = 12.5 - assert isclose(truth, area([pt0, pt1, pt2])) + assert_almost_equal(area([pt0, pt1, pt2]), truth) def test_order_edges(): diff --git a/metpy/gridding/tests/test_triangles.py b/metpy/gridding/tests/test_triangles.py index be9a6bf12ae..fcd333ce4fe 100644 --- a/metpy/gridding/tests/test_triangles.py +++ b/metpy/gridding/tests/test_triangles.py @@ -4,16 +4,14 @@ from __future__ import division -from metpy.gridding.triangles import (dist_2, distance, circumcircle_radius_2, - circumcircle_radius, circumcenter, - find_natural_neighbors, find_nn_triangles_point, - find_local_boundary, triangle_area) - -from numpy.testing import assert_array_almost_equal -from numpy.testing import assert_almost_equal +import numpy as np +from numpy.testing import assert_almost_equal, assert_array_almost_equal from scipy.spatial import Delaunay -import numpy as np +from metpy.gridding.triangles import (circumcenter, circumcircle_radius, circumcircle_radius_2, + dist_2, distance, find_local_boundary, + find_natural_neighbors, find_nn_triangles_point, + triangle_area) def test_triangle_area(): diff --git a/metpy/io/gini.py b/metpy/io/gini.py index d70099310c0..76f3ad6aabf 100644 --- a/metpy/io/gini.py +++ b/metpy/io/gini.py @@ -2,18 +2,19 @@ # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause -import logging -import re from datetime import datetime try: from enum import Enum except ImportError: from enum34 import Enum from itertools import repeat +import logging +import re import numpy as np + +from .cdm import cf_to_proj, Dataset from .tools import Bits, IOBuffer, NamedStruct, zlib_decompress_all_frames -from .cdm import Dataset, cf_to_proj from ..cbook import is_string_like from ..package_tools import Exporter diff --git a/metpy/io/nexrad.py b/metpy/io/nexrad.py index 1649474969f..3363eef7003 100644 --- a/metpy/io/nexrad.py +++ b/metpy/io/nexrad.py @@ -3,22 +3,24 @@ # SPDX-License-Identifier: BSD-3-Clause from __future__ import print_function + import bz2 +from collections import defaultdict, namedtuple, OrderedDict import datetime import gzip import logging import re import struct -from collections import defaultdict, namedtuple, OrderedDict from struct import Struct from xdrlib import Unpacker import numpy as np from scipy.constants import day, milli + +from .tools import (Array, BitField, Bits, bits_to_code, DictStruct, Enum, IOBuffer, + NamedStruct, zlib_decompress_all_frames) from ..cbook import is_string_like from ..package_tools import Exporter -from .tools import (Array, BitField, Bits, DictStruct, Enum, IOBuffer, NamedStruct, - bits_to_code, zlib_decompress_all_frames) exporter = Exporter(globals()) diff --git a/metpy/io/tests/test_gini.py b/metpy/io/tests/test_gini.py index 05e2030df31..78c463b8ae1 100644 --- a/metpy/io/tests/test_gini.py +++ b/metpy/io/tests/test_gini.py @@ -2,14 +2,14 @@ # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause -import logging from datetime import datetime +import logging from numpy.testing import assert_almost_equal import pytest -from metpy.io.gini import GiniFile, GiniProjection from metpy.cbook import get_test_data +from metpy.io.gini import GiniFile, GiniProjection log = logging.getLogger('metpy.io.gini') log.setLevel(logging.ERROR) diff --git a/metpy/io/tests/test_nexrad.py b/metpy/io/tests/test_nexrad.py index c3064f25806..062f8ab6810 100644 --- a/metpy/io/tests/test_nexrad.py +++ b/metpy/io/tests/test_nexrad.py @@ -7,12 +7,11 @@ import logging import os.path -import pytest - import numpy as np +import pytest -from metpy.io.nexrad import Level2File, Level3File, is_precip_mode from metpy.cbook import get_test_data +from metpy.io.nexrad import is_precip_mode, Level2File, Level3File # Turn off the warnings for tests logging.getLogger('metpy.io.nexrad').setLevel(logging.CRITICAL) diff --git a/metpy/io/tests/test_upperair.py b/metpy/io/tests/test_upperair.py index ffac651de9d..bfb7847e2df 100644 --- a/metpy/io/tests/test_upperair.py +++ b/metpy/io/tests/test_upperair.py @@ -4,7 +4,7 @@ from datetime import datetime -from metpy.io.upperair import UseSampleData, get_upper_air_data +from metpy.io.upperair import get_upper_air_data, UseSampleData from metpy.testing import assert_almost_equal from metpy.units import units diff --git a/metpy/io/tools.py b/metpy/io/tools.py index 5d22ea3b6aa..653a2c0619c 100644 --- a/metpy/io/tools.py +++ b/metpy/io/tools.py @@ -5,10 +5,11 @@ # SPDX-License-Identifier: BSD-3-Clause from __future__ import print_function -import logging -import zlib + from collections import namedtuple +import logging from struct import Struct +import zlib from ..units import UndefinedUnitError, units diff --git a/metpy/io/upperair.py b/metpy/io/upperair.py index 2b511a250bb..1439657164e 100644 --- a/metpy/io/upperair.py +++ b/metpy/io/upperair.py @@ -11,9 +11,9 @@ import numpy as np -from ..calc import get_wind_components from .cdm import Dataset from .tools import UnitLinker +from ..calc import get_wind_components from ..package_tools import Exporter exporter = Exporter(globals()) diff --git a/metpy/plots/ctables.py b/metpy/plots/ctables.py index 3f51221724e..7e927605578 100644 --- a/metpy/plots/ctables.py +++ b/metpy/plots/ctables.py @@ -3,10 +3,12 @@ # SPDX-License-Identifier: BSD-3-Clause from __future__ import division + import ast import glob import os.path import posixpath + import matplotlib.colors as mcolors from pkg_resources import resource_listdir, resource_stream diff --git a/metpy/plots/skewt.py b/metpy/plots/skewt.py index 4b0ad4d7114..1e6a0d80405 100644 --- a/metpy/plots/skewt.py +++ b/metpy/plots/skewt.py @@ -2,20 +2,20 @@ # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause -import numpy as np -import matplotlib.transforms as transforms -import matplotlib.axis as maxis -import matplotlib.spines as mspines from matplotlib.axes import Axes +import matplotlib.axis as maxis from matplotlib.collections import LineCollection from matplotlib.patches import Circle from matplotlib.projections import register_projection +import matplotlib.spines as mspines from matplotlib.ticker import MultipleLocator, NullFormatter, ScalarFormatter -from .util import colored_line -from ..calc import dry_lapse, moist_lapse, dewpoint, vapor_pressure -from ..units import units +import matplotlib.transforms as transforms +import numpy as np +from .util import colored_line +from ..calc import dewpoint, dry_lapse, moist_lapse, vapor_pressure from ..package_tools import Exporter +from ..units import units exporter = Exporter(globals()) diff --git a/metpy/plots/station_plot.py b/metpy/plots/station_plot.py index 8ef9800bd44..cfdfd151ec1 100644 --- a/metpy/plots/station_plot.py +++ b/metpy/plots/station_plot.py @@ -9,10 +9,10 @@ import numpy as np -from ..cbook import is_string_like -from ..package_tools import Exporter from .wx_symbols import (current_weather, high_clouds, low_clouds, mid_clouds, pressure_tendency, sky_cover, wx_symbol_font) +from ..cbook import is_string_like +from ..package_tools import Exporter exporter = Exporter(globals()) diff --git a/metpy/plots/tests/test_ctables.py b/metpy/plots/tests/test_ctables.py index c1a8413979e..3c8c3ee912a 100644 --- a/metpy/plots/tests/test_ctables.py +++ b/metpy/plots/tests/test_ctables.py @@ -12,6 +12,7 @@ buffer_args = dict(buffering=1) import numpy as np + from metpy.plots.ctables import ColortableRegistry, convert_gempak_table diff --git a/metpy/plots/tests/test_skewt.py b/metpy/plots/tests/test_skewt.py index c76a36f0854..43794923d5b 100644 --- a/metpy/plots/tests/test_skewt.py +++ b/metpy/plots/tests/test_skewt.py @@ -2,9 +2,9 @@ # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause -import numpy as np from matplotlib import style from matplotlib.gridspec import GridSpec +import numpy as np import pytest from metpy.plots.skewt import * # noqa: F403 diff --git a/metpy/plots/tests/test_station_plot.py b/metpy/plots/tests/test_station_plot.py index 29db7b33119..bc80e3bab44 100644 --- a/metpy/plots/tests/test_station_plot.py +++ b/metpy/plots/tests/test_station_plot.py @@ -2,11 +2,11 @@ # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause -import numpy as np from matplotlib import style +import numpy as np import pytest -from metpy.plots.station_plot import StationPlot, StationPlotLayout, nws_layout, simple_layout +from metpy.plots.station_plot import nws_layout, simple_layout, StationPlot, StationPlotLayout from metpy.plots.wx_symbols import high_clouds, sky_cover from metpy.testing import hide_tick_labels, make_figure, test_style from metpy.units import units diff --git a/metpy/plots/util.py b/metpy/plots/util.py index 0f271aa753a..9f9ba309c98 100644 --- a/metpy/plots/util.py +++ b/metpy/plots/util.py @@ -2,8 +2,8 @@ # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause -import numpy as np from matplotlib.collections import LineCollection +import numpy as np from ..units import concatenate diff --git a/metpy/plots/wx_symbols.py b/metpy/plots/wx_symbols.py index 85801beea25..d4fe48850d1 100644 --- a/metpy/plots/wx_symbols.py +++ b/metpy/plots/wx_symbols.py @@ -6,8 +6,8 @@ See WMO manual 485 Vol 1 for more info on the symbols. """ -from pkg_resources import resource_filename import matplotlib.font_manager as fm +from pkg_resources import resource_filename # Create a matplotlib font object pointing to our weather symbol font wx_symbol_font = fm.FontProperties(fname=resource_filename('metpy.plots', diff --git a/metpy/testing.py b/metpy/testing.py index d252914df5a..b5dafa8e404 100644 --- a/metpy/testing.py +++ b/metpy/testing.py @@ -8,9 +8,10 @@ * code for testing matplotlib figures """ -import numpy.testing from matplotlib import style +import numpy.testing from pint import DimensionalityError + from .units import units # Our lowest supported matplotlib doesn't have the classic style, so fallback to empty list diff --git a/metpy/units.py b/metpy/units.py index b32b7b92ed5..cdb0de2a898 100644 --- a/metpy/units.py +++ b/metpy/units.py @@ -14,6 +14,7 @@ ''' from __future__ import division + import numpy as np import pint import pint.unit diff --git a/setup.cfg b/setup.cfg index 44d56ed964e..1d6c518a2c7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,6 +3,7 @@ ignore = F405 max-line-length = 95 exclude = metpy/_version.py application-import-names = metpy +import-order-style = google [tool:pytest] norecursedirs = build examples docs diff --git a/setup.py b/setup.py index 426381d4f51..ae7cc88d7c7 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,10 @@ # SPDX-License-Identifier: BSD-3-Clause from __future__ import print_function + import sys -from setuptools import setup, find_packages, Command + +from setuptools import Command, find_packages, setup import versioneer