Skip to content

Commit

Permalink
Fix rows function
Browse files Browse the repository at this point in the history
  • Loading branch information
artembakhanov committed Jul 20, 2020
1 parent eee3b16 commit 79b2999
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
setup(
name='python-telegram-bot-calendar',
packages=['telegram_bot_calendar'],
version='1.0.1',
version='1.0.2',
license='MIT',
description='Python inline calendar for telegram bots',
long_description=long_description,
long_description_content_type="text/markdown",
author='Artem Bakhanov',
author_email='[email protected]',
url='https://github.com/artembakhanov/python-telegram-bot-calendar',
download_url='https://github.com/artembakhanov/python-telegram-bot-calendar/archive/v_1.0.1.tar.gz',
download_url='https://github.com/artembakhanov/python-telegram-bot-calendar/archive/v_1.0.2.tar.gz',
keywords=['calendar', 'telegram', 'bot', 'telegram bot'],
install_requires=[
'python-dateutil',
Expand Down
2 changes: 1 addition & 1 deletion telegram_bot_calendar/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def _get_period(self, step, start, diff, *args, **kwargs):


def rows(buttons, row_size):
return [buttons[i:i + row_size] for i in range(0, len(buttons) - row_size + 1, row_size)]
return [buttons[i:i + row_size] for i in range(0, max(len(buttons) - row_size, 0) + 1, row_size)]


def max_date(d, step):
Expand Down

0 comments on commit 79b2999

Please sign in to comment.