From 38e6a32be27e5f2935f64b5e3f5e862356161b7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Feb 2021 13:01:21 +0000 Subject: [PATCH 1/2] MNT: (deps): Bump flake8-simplify from 0.12.0 to 0.14.0 in /ci Bumps [flake8-simplify](https://github.com/MartinThoma/flake8-simplify) from 0.12.0 to 0.14.0. - [Release notes](https://github.com/MartinThoma/flake8-simplify/releases) - [Commits](https://github.com/MartinThoma/flake8-simplify/compare/0.12.0...0.14.0) Signed-off-by: dependabot[bot] --- ci/linting_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/linting_requirements.txt b/ci/linting_requirements.txt index 85a3cc97a3a..5c5a75ff7b5 100644 --- a/ci/linting_requirements.txt +++ b/ci/linting_requirements.txt @@ -11,7 +11,7 @@ flake8-mutable==1.2.0 flake8-pep3101==1.3.0 flake8-print==4.0.0 flake8-quotes==3.2.0 -flake8-simplify==0.12.0 +flake8-simplify==0.14.0 pep8-naming==0.11.1 flake8-rst-docstrings==0.0.14 From 4d23c7b3ce79b970b383711ef40d15bf2b28cbef Mon Sep 17 00:00:00 2001 From: Ryan May Date: Wed, 24 Feb 2021 14:38:12 -0700 Subject: [PATCH 2/2] MNT: Replace nested with blocks with a single one Found with flake8-simplify 0.14.0. --- tests/test_xarray.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/test_xarray.py b/tests/test_xarray.py index b849424be42..b51982b6086 100644 --- a/tests/test_xarray.py +++ b/tests/test_xarray.py @@ -376,12 +376,12 @@ def test_resolve_axis_conflict_double_lonlat(test_ds_generic): test_ds_generic['d'].attrs['_CoordinateAxisType'] = 'Lat' test_ds_generic['e'].attrs['_CoordinateAxisType'] = 'Lon' - with pytest.warns(UserWarning, match='More than one x coordinate'): - with pytest.raises(AttributeError): - test_ds_generic['test'].metpy.x - with pytest.warns(UserWarning, match='More than one y coordinate'): - with pytest.raises(AttributeError): - test_ds_generic['test'].metpy.y + with pytest.warns(UserWarning, match='More than one x coordinate'),\ + pytest.raises(AttributeError): + test_ds_generic['test'].metpy.x + with pytest.warns(UserWarning, match='More than one y coordinate'),\ + pytest.raises(AttributeError): + test_ds_generic['test'].metpy.y def test_resolve_axis_conflict_double_xy(test_ds_generic): @@ -391,12 +391,12 @@ def test_resolve_axis_conflict_double_xy(test_ds_generic): test_ds_generic['d'].attrs['standard_name'] = 'projection_x_coordinate' test_ds_generic['e'].attrs['standard_name'] = 'projection_y_coordinate' - with pytest.warns(UserWarning, match='More than one x coordinate'): - with pytest.raises(AttributeError): - test_ds_generic['test'].metpy.x - with pytest.warns(UserWarning, match='More than one y coordinate'): - with pytest.raises(AttributeError): - test_ds_generic['test'].metpy.y + with pytest.warns(UserWarning, match='More than one x coordinate'),\ + pytest.raises(AttributeError): + test_ds_generic['test'].metpy.x + with pytest.warns(UserWarning, match='More than one y coordinate'),\ + pytest.raises(AttributeError): + test_ds_generic['test'].metpy.y def test_resolve_axis_conflict_double_x_with_single_dim(test_ds_generic): @@ -413,9 +413,9 @@ def test_resolve_axis_conflict_double_vertical(test_ds_generic): test_ds_generic['b'].attrs['units'] = 'hPa' test_ds_generic['c'].attrs['units'] = 'Pa' - with pytest.warns(UserWarning, match='More than one vertical coordinate'): - with pytest.raises(AttributeError): - test_ds_generic['test'].metpy.vertical + with pytest.warns(UserWarning, match='More than one vertical coordinate'),\ + pytest.raises(AttributeError): + test_ds_generic['test'].metpy.vertical criterion_matches = [