Skip to content

Commit

Permalink
fix some lints
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Apr 11, 2024
1 parent 3ddd88b commit d3ee89b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
7 changes: 1 addition & 6 deletions compliance_checker/cf/cf_1_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -2764,12 +2764,7 @@ def check_cell_boundaries(self, ds):
):
valid = False
reasoning.append(
"Dimension {} of boundary variable (for {}) must have at least {} elements to form a simplex/closed cell with previous dimensions {}.".format(
boundary_variable.name,
variable.name,
len(variable.dimensions) + 1,
boundary_variable.dimensions[:-1],
),
f"Dimension {boundary_variable.name} of boundary variable (for {variable.name}) must have at least {len(variable.dimensions) + 1} elements to form a simplex/closed cell with previous dimensions {boundary_variable.dimensions[:-1]}.",
)
result = Result(
BaseCheck.MEDIUM,
Expand Down
7 changes: 1 addition & 6 deletions compliance_checker/cf/cf_1_7.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,7 @@ def check_cell_boundaries(self, ds):
):
valid = False
reasoning.append(
"Dimension {} of boundary variable (for {}) must have at least {} elements to form a simplex/closed cell with previous dimensions {}.".format(
boundary_variable.name,
variable.name,
len(variable.dimensions) + 1,
boundary_variable.dimensions[:-1],
),
f"Dimension {boundary_variable.name} of boundary variable (for {variable.name}) must have at least {len(variable.dimensions) + 1} elements to form a simplex/closed cell with previous dimensions {boundary_variable.dimensions[:-1]}.",
)

# 7.1 Required 3/5:
Expand Down
4 changes: 1 addition & 3 deletions compliance_checker/tests/test_cf_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
'§2.6.1 Conventions global attribute does not contain "CF-1.8"',
f"standard_name visibility is not defined in Standard Name Table v{std_names._version}. Possible close match(es): ['visibility_in_air']",
'Standard name modifier "data_quality" for variable visibility_qc is not a valid modifier according to CF Appendix C',
"standard_name wind_direction is not defined in Standard Name Table v{}. Possible close match(es): ['wind_to_direction', 'wind_from_direction', 'wind_gust_from_direction']".format(
std_names._version,
),
f"standard_name wind_direction is not defined in Standard Name Table v{std_names._version}. Possible close match(es): ['wind_to_direction', 'wind_from_direction', 'wind_gust_from_direction']",
'Standard name modifier "data_quality" for variable wind_direction_qc is not a valid modifier according to CF Appendix C',
f"standard_name wind_gust is not defined in Standard Name Table v{std_names._version}. Possible close match(es): ['y_wind_gust', 'x_wind_gust', 'wind_speed_of_gust']",
'Standard name modifier "data_quality" for variable wind_gust_qc is not a valid modifier according to CF Appendix C',
Expand Down

0 comments on commit d3ee89b

Please sign in to comment.