Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add parameter checks to DayLocator initiator #6955
Conversation
mdboom
added the
needs_review
label
Aug 18, 2016
story645
and 1 other
commented on an outdated diff
Aug 18, 2016
| @@ -1254,6 +1241,12 @@ def __init__(self, bymonthday=None, interval=1, tz=None): | ||
| Default is to tick every day of the month: ``bymonthday=range(1,32)`` | ||
| """ | ||
| + if interval < 1: | ||
| + raise ValueError("The interval parameter must be an integer " |
story645
Member
|
story645
and 2 others
commented on an outdated diff
Aug 18, 2016
| @@ -1241,10 +1241,7 @@ def __init__(self, bymonthday=None, interval=1, tz=None): | ||
| Default is to tick every day of the month: ``bymonthday=range(1,32)`` | ||
| """ | ||
| - if interval < 1: | ||
| - raise ValueError("The interval parameter must be an integer " | ||
| - "greater than or equal to one.") | ||
| - if not isinstance(interval, int): | ||
| + if interval < 1 or not isinstance(interval, int): | ||
| raise ValueError("The interval parameter must be an integer " | ||
| "greater than or equal to one.") |
story645
Member
|
LindyBalboa
commented
Aug 19, 2016
•
|
I'm confused as to what happened to the one Travis build. Someone mind taking a look? I reran the mathtext test locally and it was no problem. |
tacaswell
and 1 other
commented on an outdated diff
Aug 20, 2016
| @@ -1254,6 +1241,8 @@ def __init__(self, bymonthday=None, interval=1, tz=None): | ||
| Default is to tick every day of the month: ``bymonthday=range(1,32)`` | ||
| """ | ||
| + if not isinstance(interval, int) or interval < 1: |
tacaswell
Owner
|
tacaswell
added this to the
2.0.1 (next bug fix release)
milestone
Aug 20, 2016
|
For reasons un-known the math text tests are flaky, restarted the tests. |
tacaswell
added needs_revision and removed needs_review
labels
Aug 20, 2016
tacaswell
referenced
this pull request
Aug 20, 2016
Closed
Value checking the numpoints argument to be a whole number. #6949
LindyBalboa
closed this
Aug 21, 2016
LindyBalboa
deleted the
LindyBalboa:issue_6935 branch
Aug 21, 2016
mdboom
removed the
needs_revision
label
Aug 21, 2016
LindyBalboa
restored the
LindyBalboa:issue_6935 branch
Aug 21, 2016
LindyBalboa
reopened this
Aug 21, 2016
mdboom
added the
needs_review
label
Aug 21, 2016
|
Looks good. Can you add a test for that exception being raised on invalid input? |
added some commits
Aug 22, 2016
tacaswell
merged commit a53c4b3
into matplotlib:master
Aug 22, 2016
tacaswell
removed the
needs_review
label
Aug 22, 2016
tacaswell
added a commit
that referenced
this pull request
Aug 22, 2016
|
|
tacaswell |
125a296
|
|
backported to V2.x as 125a296 |
LindyBalboa commentedAug 18, 2016
Check that interval parameter is an integer greater than zero.
Delete unuseful 'optimization' meant to prevent exceeding the
MAXTICKS variable. During testing it seemed ineffective. The
following Locator.raise_if_exceeds exception was triggered first
anyways.
resolves #6935