From 6d10b4e795679965dfd7f5e4ff027151ff629b8f Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 3 Feb 2019 00:28:23 +0000 Subject: [PATCH] Fix comparisons for pyflakes 2.1 The latest release of flake8 updates to pyflakes 2.1, and with that comes an expectation that typical variable equality comparisons should avoid the use of "is" and "is not" for safety. Adjust a couple places we previously ran afoul of the new F632 check. --- mudpy/misc.py | 2 +- mudpy/tests/selftest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mudpy/misc.py b/mudpy/misc.py index 2bf4db3..7c013a8 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -636,7 +636,7 @@ class User: def authenticate(self): """Flag the user as authenticated and disconnect duplicates.""" - if self.state is not "authenticated": + if self.state != "authenticated": self.authenticated = True if ("mudpy.limit" in universe.contents and self.account.subkey in universe.contents["mudpy.limit"].get("admins")): diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index 055e50a..2cbed03 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -475,7 +475,7 @@ def main(): conversant].read_very_eager().decode("utf-8") except Exception: pass - if index is not 0: + if index != 0: tlog("\nERROR: luser%s did not receive expected string:\n\n" "%s\n\n" "Check the end of capture_%s.log for received data." -- 2.11.0