Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c07b9a3

Browse files
committed
refactoring, unicode, pytest >=3.1 & !=3.0
1 parent 8d77466 commit c07b9a3

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ install:
6666
- activate test-environment
6767
- echo %PYTHON_VERSION% %TARGET_ARCH%
6868
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
69-
- pip install -q "pytest>=3.4.0" "pytest-cov>=2.3.1" pytest-rerunfailures pytest-timeout pytest-xdist
69+
- pip install -q "pytest>=3.1.0&pytest!=3.3.0" "pytest-cov>=2.3.1" pytest-rerunfailures pytest-timeout pytest-xdist
7070

7171
# Apply patch to `subprocess` on Python versions > 2 and < 3.6.3
7272
# https://github.com/matplotlib/matplotlib/issues/9176

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ env:
5252
- NUMPY=numpy
5353
- PANDAS=
5454
- PYPARSING=pyparsing
55-
- PYTEST="pytest>=3.4.0"
55+
- PYTEST="pytest>=3.1.0&pytest!=3.3.0"
5656
- PYTEST_COV=pytest-cov
5757
- PYTEST_PEP8=
5858
- SPHINX=sphinx

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6442,7 +6442,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
64426442
if normed is not None:
64436443
warnings.warn("The 'normed' kwarg is deprecated, and has been "
64446444
"replaced by the 'density' kwarg.")
6445-
6445+
64466446
# basic input validation
64476447
input_empty = np.size(x) == 0
64486448
# Massage 'x' for processing.

lib/matplotlib/category.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import six
1212

13+
1314
import numpy as np
1415

1516
import matplotlib.units as units
@@ -130,11 +131,10 @@ def __init__(self, data=None):
130131
data: iterable
131132
sequence of string values
132133
"""
133-
if data is None:
134-
data = ()
135134
self._mapping = OrderedDict()
136135
self._counter = itertools.count(start=0)
137-
self.update(data)
136+
if data is not None:
137+
self.update(data)
138138

139139
def update(self, data):
140140
"""Maps new values to integer identifiers.

lib/matplotlib/tests/test_category.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ def test_update_plot(self, ax, plotter):
256256
PLOT_BROKEN_LIST = [Axes.scatter,
257257
pytest.param(Axes.plot, marks=pytest.mark.xfail),
258258
pytest.param(Axes.bar, marks=pytest.mark.xfail)]
259+
259260
PLOT_BROKEN_IDS = ["scatter", "plot", "bar"]
260261

261262
@pytest.mark.parametrize("plotter", PLOT_BROKEN_LIST, ids=PLOT_BROKEN_IDS)

0 commit comments

Comments
 (0)