Skip to content

Commit

Permalink
removed ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
winash12 committed Jul 17, 2024
1 parent 4893323 commit 7aa6e84
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/metpy/calc/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1948,8 +1948,9 @@ def _remove_nans(*variables):
@exporter.export
def bounding_box_mask(data_array, min_lat, max_lat, min_lon, max_lon):
"""Construct a bounding box mask within the specified coordinates.
All values that satisfy the condition below will have 1 in the mask
and others zero
and others zero.
"""
mask = ((data_array.latitude <= max_lat) & (data_array.latitude >= min_lat)
& (data_array.longitude <= max_lon) & (data_array.longitude >= min_lon))
Expand All @@ -1960,7 +1961,7 @@ def bounding_box_mask(data_array, min_lat, max_lat, min_lon, max_lon):

@exporter.export
def find_bounding_box_indices(data_mask, min_lat, max_lat, min_lon, max_lon):
"""Computes the array indices of a bounding box"""
"""Computes the array indices of a bounding box."""

Check failure on line 1964 in src/metpy/calc/tools.py

View workflow job for this annotation

GitHub Actions / Flake8

[ruff] reported by reviewdog 🐶 D401 First line of docstring should be in imperative mood: "Computes the array indices of a bounding box." Raw Output: src/metpy/calc/tools.py:1964:5: D401 First line of docstring should be in imperative mood: "Computes the array indices of a bounding box."

Check failure on line 1965 in src/metpy/calc/tools.py

View workflow job for this annotation

GitHub Actions / Flake8

[ruff] reported by reviewdog 🐶 W293 [*] Blank line contains whitespace Raw Output: src/metpy/calc/tools.py:1965:1: W293 [*] Blank line contains whitespace
@dataclass
class BoundingBoxIndices:
Expand All @@ -1979,7 +1980,7 @@ class BoundingBoxIndices:
@exporter.export
def get_vectorized_array_indices(i_bb_indices):
"""function computes the vectorization indices for inner for loop in the

Check failure on line 1982 in src/metpy/calc/tools.py

View workflow job for this annotation

GitHub Actions / Flake8

[ruff] reported by reviewdog 🐶 D202 [*] No blank lines allowed after function docstring (found 1) Raw Output: src/metpy/calc/tools.py:1982:5: D202 [*] No blank lines allowed after function docstring (found 1)

Check failure on line 1982 in src/metpy/calc/tools.py

View workflow job for this annotation

GitHub Actions / Flake8

[ruff] reported by reviewdog 🐶 D205 1 blank line required between summary line and description Raw Output: src/metpy/calc/tools.py:1982:5: D205 1 blank line required between summary line and description

Check failure on line 1982 in src/metpy/calc/tools.py

View workflow job for this annotation

GitHub Actions / Flake8

[ruff] reported by reviewdog 🐶 D401 First line of docstring should be in imperative mood: "function computes the vectorization indices for inner for loop in the" Raw Output: src/metpy/calc/tools.py:1982:5: D401 First line of docstring should be in imperative mood: "function computes the vectorization indices for inner for loop in the"

Check failure on line 1982 in src/metpy/calc/tools.py

View workflow job for this annotation

GitHub Actions / Flake8

[ruff] reported by reviewdog 🐶 D403 [*] First word of the first line should be capitalized: `function` -> `Function` Raw Output: src/metpy/calc/tools.py:1982:5: D403 [*] First word of the first line should be capitalized: `function` -> `Function`
wind field reconstruction method
wind field reconstruction method.
"""

Check failure on line 1985 in src/metpy/calc/tools.py

View workflow job for this annotation

GitHub Actions / Flake8

[ruff] reported by reviewdog 🐶 W293 [*] Blank line contains whitespace Raw Output: src/metpy/calc/tools.py:1985:1: W293 [*] Blank line contains whitespace
i_x_ll = i_bb_indices.x_ll
Expand Down

0 comments on commit 7aa6e84

Please sign in to comment.