Skip to content

Commit 730c47a

Browse files
committed
tidy
1 parent 5decf3f commit 730c47a

4 files changed

Lines changed: 13 additions & 10 deletions

File tree

cf/test/test_Field.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import atexit
22
import datetime
33
import faulthandler
4-
from importlib.util import find_spec
54
import itertools
65
import os
76
import re
87
import tempfile
98
import unittest
9+
from importlib.util import find_spec
1010

1111
import numpy
1212
import numpy as np
@@ -1154,7 +1154,8 @@ def test_Field_insert_dimension(self):
11541154
f.insert_dimension(1, "qwerty")
11551155

11561156
@unittest.skipUnless(
1157-
find_spec("matplotlib"), "matplotlib required but not installed")
1157+
find_spec("matplotlib"), "matplotlib required but not installed"
1158+
)
11581159
def test_Field_indices(self):
11591160
f = cf.read(self.filename)[0]
11601161

cf/test/test_RegridOperator.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import datetime
22
import faulthandler
3-
from importlib.util import find_spec
43
import unittest
4+
from importlib.util import find_spec
55

66
faulthandler.enable() # to debug seg faults and timeouts
77

88
import cf
99

10-
1110
# ESMF renamed its Python module to `esmpy` at ESMF version 8.4.0. Allow
1211
# either for now for backwards compatibility.
1312
esmpy_imported = False

cf/test/test_read_write.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import inspect
55
import os
66
import shutil
7-
import shutil
87
import subprocess
98
import tempfile
109
import unittest
@@ -644,7 +643,8 @@ def test_read_write_unlimited(self):
644643
self.assertTrue(domain_axes["domainaxis2"].nc_is_unlimited())
645644

646645
@unittest.skipUnless(
647-
shutil.which("ncdump"), "ncdump required - install nco")
646+
shutil.which("ncdump"), "ncdump required - install nco"
647+
)
648648
def test_read_CDL(self):
649649
subprocess.run(
650650
" ".join(["ncdump", self.filename, ">", tmpfile]),
@@ -707,7 +707,8 @@ def test_read_CDL(self):
707707
cf.read("test_read_write.py")
708708

709709
@unittest.skipUnless(
710-
shutil.which("ncdump"), "ncdump required - install nco")
710+
shutil.which("ncdump"), "ncdump required - install nco"
711+
)
711712
def test_read_cdl_string(self):
712713
"""Test the cf.read 'cdl_string' keyword."""
713714
f = cf.read("example_field_0.nc")[0]
@@ -882,7 +883,8 @@ def test_read_url(self):
882883
self.assertEqual(len(f), 1)
883884

884885
@unittest.skipUnless(
885-
shutil.which("ncdump"), "ncdump required - install nco")
886+
shutil.which("ncdump"), "ncdump required - install nco"
887+
)
886888
def test_read_dataset_type(self):
887889
"""Test the cf.read 'dataset_type' keyword."""
888890
# netCDF dataset

cf/test/test_style.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import datetime
22
import faulthandler
3-
from importlib.util import find_spec
43
import os
54
import unittest
5+
from importlib.util import find_spec
66

77
faulthandler.enable() # to debug seg faults and timeouts
88

@@ -31,7 +31,8 @@ def setUp(self):
3131
]
3232

3333
@unittest.skipUnless(
34-
find_spec("pycodestyle"), "pycodestyle required but not installed")
34+
find_spec("pycodestyle"), "pycodestyle required but not installed"
35+
)
3536
def test_pep8_compliance(self):
3637
import pycodestyle
3738

0 commit comments

Comments
 (0)