Skip to content

Commit

Permalink
Merge pull request #115 from evanpurkhiser/black-docstrings
Browse files Browse the repository at this point in the history
black: Consistent spacing in docstrings
  • Loading branch information
kiorky authored Oct 30, 2024
2 parents fcf5ff8 + 8b854ee commit f834b43
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/croniter/croniter.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def datetime_to_timestamp(d):


class CroniterError(ValueError):
""" General top-level Croniter base exception """
"""General top-level Croniter base exception"""

pass


Expand All @@ -146,25 +147,29 @@ class CroniterBadTypeRangeError(TypeError):


class CroniterBadCronError(CroniterError):
""" Syntax, unknown value, or range error within a cron expression """
"""Syntax, unknown value, or range error within a cron expression"""

pass


class CroniterUnsupportedSyntaxError(CroniterBadCronError):
""" Valid cron syntax, but likely to produce inaccurate results """
"""Valid cron syntax, but likely to produce inaccurate results"""

# Extending CroniterBadCronError, which may be contridatory, but this allows
# catching both errors with a single exception. From a user perspective
# these will likely be handled the same way.
pass


class CroniterBadDateError(CroniterError):
""" Unable to find next/prev timestamp match """
"""Unable to find next/prev timestamp match"""

pass


class CroniterNotAlphaError(CroniterBadCronError):
""" Cron syntax contains an invalid day or month abbreviation """
"""Cron syntax contains an invalid day or month abbreviation"""

pass


Expand Down Expand Up @@ -761,7 +766,7 @@ def _get_prev_nearest_diff(x, to_check, range_val):

@staticmethod
def _get_nth_weekday_of_month(year, month, day_of_week):
""" For a given year/month return a list of days in nth-day-of-month order.
"""For a given year/month return a list of days in nth-day-of-month order.
The last weekday of the month is always [-1].
"""
w = (day_of_week + 6) % 7
Expand Down

0 comments on commit f834b43

Please sign in to comment.