From 54e04a25781a8d7398f98ab097808db5c6573a43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 13:12:57 +0000 Subject: [PATCH 1/3] CI: (deps): Bump ruff from 0.1.4 to 0.1.5 in /ci Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.4 to 0.1.5. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.4...v0.1.5) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... 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 1aedc8749bc..742839a5459 100644 --- a/ci/linting_requirements.txt +++ b/ci/linting_requirements.txt @@ -1,4 +1,4 @@ -ruff==0.1.4 +ruff==0.1.5 flake8==6.1.0 pycodestyle==2.11.1 From 4e7c71798e9310132cb2b4799d38f556bdf773c0 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Thu, 9 Nov 2023 12:36:16 -0700 Subject: [PATCH 2/3] MNT: Clean up some unused return values --- src/metpy/plots/_mpl.py | 4 ++-- tests/calc/test_indices.py | 3 +-- tools/nexrad_msgs/parse_spec.py | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/metpy/plots/_mpl.py b/src/metpy/plots/_mpl.py index b5075a4e904..fba2ba80663 100644 --- a/src/metpy/plots/_mpl.py +++ b/src/metpy/plots/_mpl.py @@ -186,7 +186,7 @@ def draw(self, renderer): posy = self.convert_yunits(self.y) pts = np.vstack((posx, posy)).T pts = trans.transform(pts) - canvasw, canvash = renderer.get_canvas_width_height() + _, canvash = renderer.get_canvas_width_height() gc = renderer.new_gc() gc.set_foreground(self.get_color()) @@ -203,7 +203,7 @@ def draw(self, renderer): continue self._text = t # hack to allow self._get_layout to work - bbox, info, descent = self._get_layout(renderer) + _, info, _ = self._get_layout(renderer) self._text = '' for line, _, x, y in info: diff --git a/tests/calc/test_indices.py b/tests/calc/test_indices.py index 77623cbc3ae..a7959835b37 100644 --- a/tests/calc/test_indices.py +++ b/tests/calc/test_indices.py @@ -138,8 +138,7 @@ def test_weighted_continuous_average_temperature(): data['temperature'], height=data['height'], depth=6000 * units('meter')) - # Commenting out since it won't run until the above can run without error - # assert_almost_equal(t, 279.3275828240889 * units('kelvin'), 7) + assert_almost_equal(t, 279.3275828240889 * units('kelvin'), 7) def test_weighted_continuous_average_elevated(): diff --git a/tools/nexrad_msgs/parse_spec.py b/tools/nexrad_msgs/parse_spec.py index 87034f998b1..f3417724e29 100644 --- a/tools/nexrad_msgs/parse_spec.py +++ b/tools/nexrad_msgs/parse_spec.py @@ -63,7 +63,8 @@ def process_msg18(fname): if len(parts) == 8: parts = parts[:6] + [parts[6] + parts[7]] - var_name, desc, typ, units, rng, prec, byte_range = parts + # var_name, desc, typ, units, rng, prec, byte_range + var_name, desc, typ, units, _, _, byte_range = parts start, end = map(int, byte_range.split('-')) size = end - start + 1 assert size >= 4 From 10554aedde42c89d33bd52c87ca1c8502bfe9fb5 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Thu, 9 Nov 2023 14:10:27 -0700 Subject: [PATCH 3/3] CI: Fix copy/paste of flake8->ruff in linting message --- .github/workflows/linting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index bf8e1b8eebd..1d66af844fa 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -39,7 +39,7 @@ jobs: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -o pipefail - ruff check . | reviewdog -f=pep8 -name=flake8 -reporter=github-check -filter-mode=nofilter + ruff check . | reviewdog -f=pep8 -name=ruff -reporter=github-check -filter-mode=nofilter - name: Run flake8 env: