From 9ddbc2db0c52ae746ec23f07e160ec203c6b8c70 Mon Sep 17 00:00:00 2001 From: RoryPTB <47696929+RoryPTB@users.noreply.github.com> Date: Thu, 7 Mar 2024 13:57:06 +0100 Subject: [PATCH] Replaced '__contains__' with 'in' --- synop2bufr/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/synop2bufr/__init__.py b/synop2bufr/__init__.py index 94bd4fb..a68c370 100644 --- a/synop2bufr/__init__.py +++ b/synop2bufr/__init__.py @@ -1225,7 +1225,7 @@ def extract_individual_synop(data: str) -> list: # that we're about to throw away (data[0]) also contains AAXX. # If this is true, there must be a typo present at the AAXX YYGGiw # part and thus we can't process the message. - if data[0].__contains__("AAXX"): + if "AAXX" in data[0]: raise ValueError(( f"The following SYNOP message is invalid: {data[0]}" " Please check again for typos." @@ -1238,7 +1238,7 @@ def extract_individual_synop(data: str) -> list: if "AAXX" in d: s0 = d else: - if not d.__contains__("="): + if "=" not in d: raise ValueError(( "Delimiters (=) are not present in the string," " thus unable to identify separate SYNOP reports."