diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b538678..4cf34ce 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,10 @@ This document records all notable changes to `pyluach `_. +`1.4.1`_ (2022-03-25) +--------------------- +* Fixed mistakes in docstring and error message. + `1.4.0`_ (2022-02-21) --------------------- * Added parameter `include_working_days` to festival method and function. @@ -50,6 +54,7 @@ This project adheres to `Semantic Versioning `_. * Initial public release +.. _`1.4.1`: https://github.com/simlist/pyluach/compare/v1.4.0...v1.4.1 .. _`1.4.0`: https://github.com/simlist/pyluach/compare/v1.3.0...v1.4.0 .. _`1.3.0`: https://github.com/simlist/pyluach/compare/v1.2.1...v1.3.0 .. _`1.2.1`: https://github.com/simlist/pyluach/compare/v1.2.0...v1.2.1 diff --git a/docs/conf.py b/docs/conf.py index 16a7da5..9864b7b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ author = 'MS List' # The full version, including alpha/beta/rc tags -release = '1.4.0' +release = '1.4.1' # -- General configuration --------------------------------------------------- diff --git a/pyluach/hebrewcal.py b/pyluach/hebrewcal.py index eb122db..ccd6260 100644 --- a/pyluach/hebrewcal.py +++ b/pyluach/hebrewcal.py @@ -326,8 +326,10 @@ def __init__(self, year, month): leap = utils._is_leap(self.year) yearlength = 13 if leap else 12 if month < 1 or month > yearlength: - raise ValueError('''Month must be between 1 and 12 for a normal - year and 13 for a leap year.''') + raise ValueError( + 'Month must be between 1 and 12 for a normal ' + 'year and 13 for a leap year.' + ) self.month = month self.name = utils._month_name(self.year, self.month, False) @@ -358,7 +360,7 @@ def __add__(self, other): return Month(self.year, yearmonths[index + other]) return Month(self.year + 1, 7).__add__(other - 1 - leftover_months) except (AttributeError, TypeError) as e: - raise TypeError('You can only add a number to a year.') from e + raise TypeError('You can only add a number to a month.') from e def __sub__(self, other): if isinstance(other, Number): @@ -484,7 +486,7 @@ def starting_weekday(self): return HebrewDate(self.year, self.month, 1).weekday() def _elapsed_months(self): - '''Return number of months elapsed from beginning of calendar''' + """Return number of months elapsed from beginning of calendar""" yearmonths = tuple(Year(self.year)) months_elapsed = ( utils._elapsed_months(self.year) @@ -498,8 +500,7 @@ def iterdates(self): Yields ------ ``HebrewDate`` - The next Hebrew Date of the year starting the first day of - Tishrei through the last day of Ellul. + The next Hebrew date of the month. """ for day in self: yield HebrewDate(self.year, self.month, day) diff --git a/setup.py b/setup.py index 5fb0b22..800790d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='pyluach', - version='1.4.0', + version='1.4.1', author='MS List', author_email='simlist@gmail.com', packages=['pyluach', ],