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: 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 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