projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Test with the bugbear plugin for flake8
[mudpy.git]
/
mudpy
/
misc.py
diff --git
a/mudpy/misc.py
b/mudpy/misc.py
index
7c013a8
..
76f4099
100644
(file)
--- a/
mudpy/misc.py
+++ b/
mudpy/misc.py
@@
-1191,7
+1191,7
@@
def weighted_choice(data):
# create the expanded list of keys
for key in data.keys():
# 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
expanded.append(key)
# return one at random
@@
-1242,7
+1242,7
@@
def random_name():
name = ""
# create a name of random length from the syllables
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
name += weighted_choice(syllables)
# strip any leading quotemark, capitalize and return the name