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 #201

Merged
merged 2 commits into from
Jan 4, 2024
Merged
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
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -14,7 +14,7 @@ repos:
- id: check-yaml

- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.12.1
hooks:
- id: black-jupyter

Expand All @@ -27,17 +27,17 @@ repos:
hooks:
- id: seed-isort-config
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v4.0.0-alpha.8
hooks:
- id: prettier

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies: [
Expand Down
2 changes: 1 addition & 1 deletion xbatcher/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def validate_batch_dimensions(

# Check the names and lengths of the dimensions are equal
TestCase().assertDictEqual(
expected_dims, batch.sizes.mapping, msg="Dimension names and/or lengths differ"
expected_dims, dict(batch.sizes), msg="Dimension names and/or lengths differ"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applying this patch to fix error: "Mapping[Hashable, int]" has no attribute "mapping" [attr-defined], due to what might be an incorrect type hint in upstream xarray. The batch.sizes variable should probably have a type hint of xarray.core.utils.Frozen instead?

)
# Check the dimension order is equal
for var in batch.data_vars:
Expand Down