From 16b560e0dbafa32b58afedeff51e46264ac9c192 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Sat, 29 Aug 2020 16:38:26 -0600 Subject: [PATCH] MAINT: Getting rid of Flake8 errors --- lib/cartopy/tests/mpl/__init__.py | 2 -- lib/cartopy/tests/mpl/test_axes.py | 3 ++- lib/cartopy/tests/mpl/test_examples.py | 2 +- lib/cartopy/tests/mpl/test_pseudo_color.py | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/cartopy/tests/mpl/__init__.py b/lib/cartopy/tests/mpl/__init__.py index c79b9ab4f..3f5c136df 100644 --- a/lib/cartopy/tests/mpl/__init__.py +++ b/lib/cartopy/tests/mpl/__init__.py @@ -5,7 +5,6 @@ # licensing details. import base64 -import contextlib import distutils import os import glob @@ -148,7 +147,6 @@ def run_figure_comparisons(self, figures, test_name): self.save_figure(figure, result_path) self.do_compare(result_path, expected_path, self.tolerance) - def save_figure(self, figure, result_fname): """ The actual call which saves the figure. diff --git a/lib/cartopy/tests/mpl/test_axes.py b/lib/cartopy/tests/mpl/test_axes.py index 895dac45e..e28737ad3 100644 --- a/lib/cartopy/tests/mpl/test_axes.py +++ b/lib/cartopy/tests/mpl/test_axes.py @@ -125,7 +125,8 @@ def test_geoaxes_subplot(): @ImageTesting(['geoaxes_subslice']) def test_geoaxes_no_subslice(): """Test that we do not trigger matplotlib's line subslice optimization.""" - # This behavior caused lines with > 1000 points and sorted data to disappear + # This behavior caused lines with > 1000 points and + # sorted data to disappear fig, axes = plt.subplots(1, 2, subplot_kw={'projection': ccrs.Mercator()}) for ax, num_points in zip(axes, [1000, 1001]): diff --git a/lib/cartopy/tests/mpl/test_examples.py b/lib/cartopy/tests/mpl/test_examples.py index 8879c5e73..b082b0a0c 100644 --- a/lib/cartopy/tests/mpl/test_examples.py +++ b/lib/cartopy/tests/mpl/test_examples.py @@ -8,7 +8,7 @@ import pytest import cartopy.crs as ccrs -from cartopy.tests.mpl import MPL_VERSION, ImageTesting +from cartopy.tests.mpl import ImageTesting class ExampleImageTesting(ImageTesting): diff --git a/lib/cartopy/tests/mpl/test_pseudo_color.py b/lib/cartopy/tests/mpl/test_pseudo_color.py index c3d280ae8..b08436566 100644 --- a/lib/cartopy/tests/mpl/test_pseudo_color.py +++ b/lib/cartopy/tests/mpl/test_pseudo_color.py @@ -9,7 +9,6 @@ import matplotlib.pyplot as plt import numpy as np -import pytest import cartopy.crs as ccrs