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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -12,12 +12,12 @@ repos:
- id: check-ast
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.2
rev: v0.9.1
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
language_version: python3
Expand All @@ -38,7 +38,7 @@ repos:
types_or: [python, markdown, rst]
additional_dependencies: [tomli]
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.19.1
hooks:
- id: pyupgrade
- repo: https://github.com/MarcoGorelli/madforhooks
Expand All @@ -47,18 +47,18 @@ repos:
# - id: conda-env-sorter # conflicts with prettier
- id: check-execution-order
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
rev: 0.7.21
hooks:
- id: mdformat
additional_dependencies: [mdformat-gfm, mdformat-black]
exclude: ^.github/ # this avoid the hook to wrongly reformats md issue template files
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
rev: 0.8.1
hooks:
- id: nbstripout
args: [--keep-output]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.7
rev: 1.9.1
hooks:
- id: nbqa-black
- id: nbqa-ruff
Expand Down
2 changes: 1 addition & 1 deletion gpm/accessor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
"""This directory defines GPM-API xarray accessors."""
from .methods import GPM_DataArray_Accessor, GPM_Dataset_Accessor

__all__ = ["GPM_Dataset_Accessor", "GPM_DataArray_Accessor"]
__all__ = ["GPM_DataArray_Accessor", "GPM_Dataset_Accessor"]
4 changes: 2 additions & 2 deletions gpm/bucket/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
__all__ = [
"LonLatPartitioning",
"TilePartitioning",
"read",
"merge_granule_buckets",
"write_granules_bucket",
"read",
"write_bucket",
"write_granules_bucket",
]
4 changes: 2 additions & 2 deletions gpm/gv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
from gpm.gv.routines import volume_matching

__all__ = [
"calibration_summary",
"compare_maps",
"reflectivity_distribution",
"reflectivity_scatterplot",
"reflectivity_scatterplots",
"reflectivity_distribution",
"calibration_summary",
"volume_matching",
]
2 changes: 1 addition & 1 deletion gpm/io/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ def download_archive(
list_status = []
list_versions = []
for i, date in enumerate(dates):
warn_missing_files = not (i == 0 or i == len(dates) - 1 and date == end_time)
warn_missing_files = not (i == 0 or (i == len(dates) - 1 and date == end_time))

status, available_version = _download_daily_data(
date=date,
Expand Down
10 changes: 5 additions & 5 deletions gpm/visualization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
)

__all__ = [
"add_map_inset",
"plot_cartopy_background",
"plot_colorbar",
"plot_image",
"plot_labels",
"plot_patches",
"plot_map",
"plot_image",
"plot_map_mesh",
"add_map_inset",
"plot_colorbar",
"plot_cartopy_background",
"plot_patches",
]
6 changes: 3 additions & 3 deletions gpm/visualization/facetgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def map_dataarray(
FacetGrid object

"""
if kwargs.get("cbar_ax", None) is not None:
if kwargs.get("cbar_ax") is not None:
raise ValueError("cbar_ax not supported by FacetGrid.")

cmap_params, cbar_kwargs = _process_cmap_cbar_kwargs(
Expand All @@ -324,8 +324,8 @@ def map_dataarray(
da_proto = da_proto.isel({self._row_var: 0})
if self._col_var in list(da_proto.dims):
da_proto = da_proto.isel({self._col_var: 0})
if kwargs.get("rgb", None):
da_proto = da_proto.isel({kwargs.get("rgb", None): 0})
if kwargs.get("rgb"):
da_proto = da_proto.isel({kwargs.get("rgb"): 0})
x, y = _infer_xy_labels(
darray=da_proto,
x=x,
Expand Down
2 changes: 1 addition & 1 deletion gpm/visualization/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def plot_grid_mesh(
)

# Infer x and y
x, y = infer_xy_labels(xr_obj, x=x, y=y, rgb=plot_kwargs.get("rgb", None))
x, y = infer_xy_labels(xr_obj, x=x, y=y, rgb=plot_kwargs.get("rgb"))

# Create 2D mesh xarray.DataArray
da = create_grid_mesh_data_array(xr_obj, x=x, y=y)
Expand Down
2 changes: 1 addition & 1 deletion gpm/visualization/orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def wrapper(*args, **kwargs):
ax = args[1] if len(args) > 1 else kwargs.get("ax")

# Define dimensions and coordinates
x, y = infer_map_xy_coords(da, x=kwargs.get("x", None), y=kwargs.get("y", None))
x, y = infer_map_xy_coords(da, x=kwargs.get("x"), y=kwargs.get("y"))
along_track_dim, cross_track_dim = infer_orbit_xy_dim(da, x=x, y=y)

# Define kwargs
Expand Down
Loading