Skip to content

Commit

Permalink
mnt: address lint
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Aug 6, 2024
1 parent 1e56dfe commit f33f71d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/pyiem/iemre.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ def get_grids(valid, varnames=None, cursor=None, table=None, domain: str = ""):
f"from {table} WHERE valid = %s",
(dom["nx"], dom["ny"], valid),
)
data = dict(
(key, np.full((dom["ny"], dom["nx"]), np.nan)) for key in use_columns
)
data = {
key: np.full((dom["ny"], dom["nx"]), np.nan) for key in use_columns
}
for row in cursor:
for i, col in enumerate(use_columns):
data[col][row[0], row[1]] = row[2 + i]
Expand Down Expand Up @@ -285,10 +285,8 @@ def get_domain(lon: float, lat: float) -> Optional[str]:
"""Compute the domain that contains the given point."""
for domain, dom in DOMAINS.items():
if (
lon >= dom["west"]
and lon < dom["east"]
and lat >= dom["south"]
and lat < dom["north"]
dom["west"] <= lon < dom["east"]
and dom["south"] <= lat < dom["north"]
):
return domain
return None

Check warning on line 292 in src/pyiem/iemre.py

View check run for this annotation

Codecov / codecov/patch

src/pyiem/iemre.py#L292

Added line #L292 was not covered by tests
Expand Down

0 comments on commit f33f71d

Please sign in to comment.