Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #1057

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- test_requirements.txt

- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.3.0
hooks:
- id: black
language_version: python3
Expand All @@ -31,7 +31,7 @@ repos:


- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
rev: v0.3.5
hooks:
- id: ruff

Expand Down
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
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires = [
]

[tool.ruff]
select = [
lint.select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
Expand All @@ -24,11 +24,11 @@ exclude = [
"compliance_checker/cf/cf.py",
]

ignore = [
lint.ignore = [
"E501",
]

[tool.ruff.per-file-ignores]
[lint.per-file-ignores]
"docs/source/conf.py" = [
"E402",
"A001",
Expand Down
Loading