From 1ff467ff5fd6f875f3ac439eb8d93d970ac7a5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Ye=C5=9Fil=C3=A7i=C3=A7ek?= Date: Tue, 14 Sep 2021 13:09:46 +0300 Subject: [PATCH] Replace the use of is not with string literals In Python 3.8, a new warning is introduced when is/is not used with certain types of literals. More details here: https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-python-behavior --- iyzipay/pki_builder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iyzipay/pki_builder.py b/iyzipay/pki_builder.py index e49b635..93bfa90 100644 --- a/iyzipay/pki_builder.py +++ b/iyzipay/pki_builder.py @@ -8,7 +8,7 @@ def append(self, key, value=None): return self def append_price(self, key, value=None): - if value is not None and value is not "": + if value is not None and value != "": self.append_key_value(key, str(round(float(value), 2))) return self @@ -22,7 +22,7 @@ def append_array(self, key, array=None): return self def append_key_value(self, key, value=None): - if value is not None and value is not "": + if value is not None and value != "": self.request_string = self.request_string + key + "=" + str(value) + "," def remove_trailing_comma(self):