Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-Richard committed Aug 11, 2023
1 parent 2e6fe60 commit 846bb81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/metpy/calc/thermo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3477,8 +3477,9 @@ def thickness_hydrostatic(pressure, temperature, mixing_ratio=None,

# Take the integral
diff_logp = np.diff(np.log(layer_p))
thickness = (-mpconsts.nounit.Rd / mpconsts.nounit.g *
diff_logp * (layer_virttemp[1:] + layer_virttemp[:-1]) / 2.)
thickness = (-mpconsts.nounit.Rd / mpconsts.nounit.g * diff_logp * (
layer_virttemp[1:] + layer_virttemp[:-1]) / 2.)

Check failure on line 3482 in src/metpy/calc/thermo.py

View workflow job for this annotation

GitHub Actions / Flake8

[flake8] reported by reviewdog 🐶 W293 [*] Blank line contains whitespace Raw Output: src/metpy/calc/thermo.py:3482:1: W293 [*] Blank line contains whitespace
return thickness if full_profile else np.sum(thickness)


Expand Down
2 changes: 1 addition & 1 deletion tests/calc/test_thermo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ def test_thickness_hydrostatic_full_profile():
pressure = np.array([959., 779.2, 751.3, 724.3, 700., 269.]) * units.hPa
temperature = np.array([22.2, 14.6, 12., 9.4, 7., -38.]) * units.degC
mixing = np.array([0.01458, 0.00209, 0.00224, 0.00240, 0.00256, 0.00010])
thickness = thickness_hydrostatic(pressure, temperature, mixing_ratio=mixing,
thickness = thickness_hydrostatic(pressure, temperature, mixing_ratio=mixing,
full_profile=True)
result = [1780.778, 306.126, 304.513, 281.455, 7218.833] * units.m
assert_almost_equal(thickness, result, 2)
Expand Down

0 comments on commit 846bb81

Please sign in to comment.