Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 17, 2025
1 parent 587860a commit df9bb8d
Showing 1 changed file with 4 additions and 5 deletions.
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

0 comments on commit df9bb8d

Please sign in to comment.