Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upbpo-35078:Allow customization of CSS class name of a month in calendar module #10137
Conversation
the-knights-who-say-ni
added
the
CLA signed
label
Oct 26, 2018
bedevere-bot
added
the
awaiting review
label
Oct 26, 2018
tirkarthi
reviewed
Oct 26, 2018
Lib/calendar.py Outdated
This comment has been minimized.
This comment has been minimized.
|
Tests could be added for the new change at cpython/Lib/test/test_calendar.py Line 561 in 4e3a53b self.assertIn('class="month"', local_month)
cal.cssclass_month_head = "text-center month"
local_month = cal.formatmonthname(2010, 10)
self.assertIn('class="text-center month"', local_month)A NEWS entry might help with the change. Thanks for the PR :) |
srinivasreddy
force-pushed the
srinivasreddy:35078
branch
from
b980d09
to
7c2800b
Oct 27, 2018
srinivasreddy
changed the title
bpo-35078: Allow customization of css class for the HTML table header
bpo-35078:Refactor code in calendar.py module
Oct 27, 2018
srinivasreddy
force-pushed the
srinivasreddy:35078
branch
from
5ddc8a2
to
6090ae4
Oct 27, 2018
tirkarthi
approved these changes
Oct 27, 2018
|
I would suggest adding the actual change done to the NEWS entry in addition to the current text like The month's head CSS class in :class:`calendar.LocaleHTMLCalendar`
is now customizable with attribute ``cssclass_month_head``.It's more of a personal opinion and would leave it to the reviewer to consider the wording. Other than that LGTM. Thanks for your contribution :) |
bedevere-bot
added
awaiting core review
and removed
awaiting review
labels
Oct 27, 2018
srinivasreddy
changed the title
bpo-35078:Refactor code in calendar.py module
bpo-35078:Allow customization of CSS class name of a month in calendar module
Oct 27, 2018
This comment has been minimized.
This comment has been minimized.
|
The code looks good to me. There's no additional test for However there's no test for the changed method Furthermore the NEWS entry is misleading (and as Serhiy noted on bpo: "We don't usually do pure refactoring changes"). I'd use something like: "Refactor If you could add a test for |
This comment has been minimized.
This comment has been minimized.
|
Sure @doerwalter |
srinivasreddy commentedOct 26, 2018
•
edited by bedevere-bot
https://bugs.python.org/issue35078