From 4f64c80c265081f8fe57c8a8766b9eac4eb7fbdf Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Mon, 16 Aug 2021 17:07:58 -0300 Subject: [PATCH] fix pre-commits --- .github/ISSUE_TEMPLATE/compliance-checker-issue-report.md | 2 +- .pre-commit-config.yaml | 4 ++-- compliance_checker/cf/cf.py | 6 ++---- compliance_checker/cfutil.py | 1 - 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/compliance-checker-issue-report.md b/.github/ISSUE_TEMPLATE/compliance-checker-issue-report.md index 0f2253fd..a9cf4447 100644 --- a/.github/ISSUE_TEMPLATE/compliance-checker-issue-report.md +++ b/.github/ISSUE_TEMPLATE/compliance-checker-issue-report.md @@ -9,7 +9,7 @@ assignees: '' **Version of compliance checker running:** -**Describe the checker this affects:** +**Describe the checker this affects:** _The ACDD, IOOS, and CF checkers are currently considered in scope for the purposes of the issue tracking on this repository. Issues with other plugins should be placed into their respective repositories._ **Attach a minimal CDL or NetCDF file which is able to reproduce the issue** diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 52df9aaa..0e0af15d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: # args: [--max-line-length=200, "--ignore=E203,E501,W503", "--select=select=C,E,F,W,B,B950"] - repo: https://github.com/pre-commit/mirrors-isort - rev: v5.8.0 + rev: v5.9.3 hooks: - id: isort additional_dependencies: [toml] @@ -34,7 +34,7 @@ repos: - id: seed-isort-config - repo: https://github.com/psf/black - rev: 21.6b0 + rev: 21.7b0 hooks: - id: black language_version: python3 diff --git a/compliance_checker/cf/cf.py b/compliance_checker/cf/cf.py index 4161f8a7..db2d3fdf 100644 --- a/compliance_checker/cf/cf.py +++ b/compliance_checker/cf/cf.py @@ -4434,8 +4434,7 @@ def check_variable_features(self, ds): # Don't bother checking if it's not a legal featureType # if the featureType attribute doesn't exist feature_type = getattr(ds, "featureType", "") - if (feature_type is not None and - feature_type.lower() not in feature_list): + if feature_type is not None and feature_type.lower() not in feature_list: return [] _feature = feature_type.lower() @@ -4446,8 +4445,7 @@ def check_variable_features(self, ds): if variable_feature is None: continue feature_types_found[variable_feature].append(name) - matching_feature = TestCtx(BaseCheck.MEDIUM, - self.section_titles["9.1"]) + matching_feature = TestCtx(BaseCheck.MEDIUM, self.section_titles["9.1"]) matching_feature.assert_true( variable_feature.lower() == _feature, "{} is not a {}, it is detected as a {}" diff --git a/compliance_checker/cfutil.py b/compliance_checker/cfutil.py index 7fff8ea4..bec13654 100644 --- a/compliance_checker/cfutil.py +++ b/compliance_checker/cfutil.py @@ -2010,7 +2010,6 @@ def guess_feature_type(nc, variable): return "reduced-grid" - def units_convertible(units1, units2, reftimeistime=True): """ Return True if a Unit representing the string units1 can be converted