Skip to content

Commit

Permalink
Merge version 1.4.1."
Browse files Browse the repository at this point in the history
  • Loading branch information
simlist committed Mar 25, 2022
2 parents 8b34c6e + 9744974 commit be4450a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This document records all notable changes to `pyluach <https://github.com/simlis
This project adheres to `Semantic Versioning <https://semver.org/>`_.


`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.
Expand Down Expand Up @@ -50,6 +54,7 @@ This project adheres to `Semantic Versioning <https://semver.org/>`_.
* 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
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---------------------------------------------------
Expand Down
13 changes: 7 additions & 6 deletions pyluach/hebrewcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', ],
Expand Down

0 comments on commit be4450a

Please sign in to comment.