summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Shadura <andrew.shadura@collabora.co.uk>2020-06-19 09:14:52 +0200
committerAndrej Shadura <andrewsh@debian.org>2020-06-19 09:23:41 +0200
commitc0dcc9b8262019acf0922d65e0f894e231506219 (patch)
treee26e05949b3a50c142137a18338483a9bdd966df
parent4242206553a70a10ead97d88c3195e4242966b48 (diff)
Use comparison with a string instead of "is" test with a literalHEADarchive/debian/2.1.0-3master
Python 3.8 deprecates "is" test with a literal, which leads to runtime warnings: urwid/numedit.py:245: SyntaxWarning: "is not" with a literal. Did you mean "!="? if default is not None and default is not "": Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk> Gbp-Pq: Name 0001-Use-comparison-with-a-string-instead-of-is-test-with.patch
-rw-r--r--urwid/numedit.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/urwid/numedit.py b/urwid/numedit.py
index 3af4e17..61766e9 100644
--- a/urwid/numedit.py
+++ b/urwid/numedit.py
@@ -242,7 +242,7 @@ class FloatEdit(NumEdit):
decimalSeparator))
val = ""
- if default is not None and default is not "":
+ if default is not None and default != "":
if not isinstance(default, (int, str, Decimal)):
raise ValueError("default: Only 'str', 'int', "
"'long' or Decimal input allowed")