Skip to content

Commit 1545b50

Browse files
max-sixtyshoyer
authored andcommitted
Add flake check to travis (#2632)
* add flake check to travis * only flake xarray * flake changes * rename flake -> flake8 in travis config
1 parent a8e5002 commit 1545b50

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ matrix:
3232
- env: CONDA_ENV=py36-rasterio
3333
- env: CONDA_ENV=py36-zarr-dev
3434
- env: CONDA_ENV=docs
35+
- env: CONDA_ENV=flake8
3536
- env: CONDA_ENV=py36-hypothesis
3637

3738
allow_failures:
@@ -62,6 +63,8 @@ before_install:
6263
install:
6364
- if [[ "$CONDA_ENV" == "docs" ]]; then
6465
conda env create -n test_env --file doc/environment.yml;
66+
elif [[ "$CONDA_ENV" == "flake8" ]]; then
67+
conda env create -n test_env --file ci/requirements-py37.yml;
6568
else
6669
conda env create -n test_env --file ci/requirements-$CONDA_ENV.yml;
6770
fi
@@ -77,6 +80,8 @@ script:
7780
- if [[ "$CONDA_ENV" == "docs" ]]; then
7881
conda install -c conda-forge sphinx sphinx_rtd_theme sphinx-gallery numpydoc;
7982
sphinx-build -n -j auto -b html -d _build/doctrees doc _build/html;
83+
elif [[ "$CONDA_ENV" == "flake8" ]]; then
84+
flake8 xarray ;
8085
elif [[ "$CONDA_ENV" == "py36-hypothesis" ]]; then
8186
pytest properties ;
8287
else

xarray/core/pdcompat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040

4141
import numpy as np
42-
import pandas as pd
4342

4443

4544
# for pandas 0.19

xarray/tests/test_dataarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ def test_sel(lab_indexer, pos_indexer, replaced_idx=False,
10281028
assert_identical(mdata.sel(x={'one': 'a', 'two': 1}),
10291029
mdata.sel(one='a', two=1))
10301030

1031-
def test_selection_multiindex(self):
1031+
def test_selection_multiindex_remove_unused(self):
10321032
# GH2619. For MultiIndex, we need to call remove_unused.
10331033
ds = xr.DataArray(np.arange(40).reshape(8, 5), dims=['x', 'y'],
10341034
coords={'x': np.arange(8), 'y': np.arange(5)})

0 commit comments

Comments
 (0)