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

chore: update pre-commit hooks #312

Merged
merged 2 commits into from
Jan 17, 2025
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ repos:
additional_dependencies: [tomli]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.14.0'
rev: 'v1.14.1'
hooks:
- id: mypy
exclude: 'noxfile\.py|docs/conf\.py'
Expand All @@ -78,7 +78,7 @@ repos:
types: [file, python]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.4"
rev: "v0.9.1"
hooks:
- id: ruff
types: [file, python]
Expand Down
9 changes: 4 additions & 5 deletions src/nc_time_axis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ def __init__(self, locator, calendar, time_units=None):
self.calendar = calendar
if time_units is not None:
warnings.warn(
"The time_units argument will be removed in nc_time_axis "
"version 1.5",
"The time_units argument will be removed in nc_time_axis version 1.5",
DeprecationWarning,
)
self.time_units = time_units
Expand Down Expand Up @@ -298,14 +297,14 @@ def __init__(self, max_n_ticks, calendar, date_unit=None, min_n_ticks=3):
self.calendar = calendar
if date_unit is not None:
warnings.warn(
"The date_unit argument will be removed in " "nc_time_axis version 1.5",
"The date_unit argument will be removed in nc_time_axis version 1.5",
DeprecationWarning,
)
self.date_unit = date_unit
else:
self.date_unit = _TIME_UNITS
if not self.date_unit.lower().startswith("days since"):
emsg = "The date unit must be days since for a NetCDF " "time locator."
emsg = "The date unit must be days since for a NetCDF time locator."
raise ValueError(emsg)
self.resolution = _DEFAULT_RESOLUTION
self._cached_resolution = {}
Expand Down Expand Up @@ -480,7 +479,7 @@ def default_units(cls, sample_point, axis):
else:
# Deal with a single `sample_point` value.
if not hasattr(sample_point, "calendar"):
msg = "Expecting cftimes with an extra " '"calendar" attribute.'
msg = 'Expecting cftimes with an extra "calendar" attribute.'
raise ValueError(msg)
calendar = sample_point.calendar
date_type = type(sample_point)
Expand Down
Loading