Skip to content

Commit

Permalink
Small code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
RoryPTB committed Jan 31, 2024
1 parent b3f5b2b commit 9687e77
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions synop2bufr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,6 @@ def transform(data: str, metadata: str, year: int,
error_msgs.append(str(e))

fh.close()
# metadata = metadata_dict[wsi]
else:
LOGGER.error("Invalid metadata")
raise ValueError("Invalid metadata")
Expand Down Expand Up @@ -1494,8 +1493,7 @@ def transform(data: str, metadata: str, year: int,
else:
# If station has not been found in the station
# list, don't repeat warning unnecessarily
if not (f"Station {tsi} not found in station file"
in warning_msgs):
if f"Station {tsi} not found in station file" not in warning_msgs: # noqa
LOGGER.warning(f"Invalid metadata for station {tsi} found in station file, unable to parse") # noqa
warning_msgs.append(f"Invalid metadata for station {tsi} found in station file, unable to parse") # noqa

Expand Down

0 comments on commit 9687e77

Please sign in to comment.