diff --git a/compliance_checker/cf/cf_1_6.py b/compliance_checker/cf/cf_1_6.py index f4ff4710..f059e0f7 100644 --- a/compliance_checker/cf/cf_1_6.py +++ b/compliance_checker/cf/cf_1_6.py @@ -443,8 +443,7 @@ def check_valid_range_and_valid_min_max_present(self, ds): total = 0 for variable in ds.variables.values(): - if (hasattr(variable, "valid_max") or - hasattr(variable, "valid_min")): + if hasattr(variable, "valid_max") or hasattr(variable, "valid_min"): total += 1 # if there's also valid_range in addition to # valid_min/valid_max, this is not compliant diff --git a/compliance_checker/tests/test_cf.py b/compliance_checker/tests/test_cf.py index 292bfd82..c86c115c 100644 --- a/compliance_checker/tests/test_cf.py +++ b/compliance_checker/tests/test_cf.py @@ -1300,7 +1300,9 @@ def test_check_time_coordinate(self): # NB: >= 60 seconds is nonstandard, but isn't actually a CF requirement # until CF 1.9 onwards dataset.variables["time"].units = "months since 0-1-1 23:00:60" - dataset.variables["time"].climatology = ( + dataset.variables[ + "time" + ].climatology = ( "nonexistent_variable_reference_only_used_to_test_year_zero_failure" ) results = self.cf.check_time_coordinate(dataset) @@ -2951,9 +2953,9 @@ def test_bad_lsid(self): messages = results[0].msgs assert results[0].value[0] < results[0].value[1] assert len(messages) == 1 - taxon_lsid[0] = ( - "http://www.lsid.info/urn:lsid:marinespecies.org:taxname:99999999999" - ) + taxon_lsid[ + 0 + ] = "http://www.lsid.info/urn:lsid:marinespecies.org:taxname:99999999999" results = self.cf.check_taxa(dataset) assert messages[0].startswith( "Taxon id must match one of the following forms:",