Test with the bugbear plugin for flake8
[mudpy.git] / mudpy / misc.py
index 2bf4db3..76f4099 100644 (file)
@@ -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")):
@@ -1191,7 +1191,7 @@ def weighted_choice(data):
 
     # create the expanded list of keys
     for key in data.keys():
-        for count in range(data[key]):
+        for _count in range(data[key]):
             expanded.append(key)
 
     # return one at random
@@ -1242,7 +1242,7 @@ def random_name():
     name = ""
 
     # create a name of random length from the syllables
-    for syllable in range(random.randrange(2, 6)):
+    for _syllable in range(random.randrange(2, 6)):
         name += weighted_choice(syllables)
 
     # strip any leading quotemark, capitalize and return the name