"""User command functions for the mudpy engine."""
-# Copyright (c) 2004-2019 mudpy authors. Permission to use, copy,
+# Copyright (c) 2004-2020 mudpy authors. Permission to use, copy,
# modify, and distribute this software is granted under terms
# provided in the LICENSE file distributed with this software.
"""Generic error for an unrecognized command word."""
# 90% of the time use a generic error
- # Whitelist the random.randrange() call in bandit since it's not used for
+ # Allow the random.randrange() call in bandit since it's not used for
# security/cryptographic purposes
if random.randrange(10): # nosec
message = '''I'm not sure what "''' + input_data + '''" means...'''
try:
# there is no other option than to use eval() for this, since
# its purpose is to evaluate arbitrary expressions, so do what
- # we can to secure it and whitelist it for bandit analysis
+ # we can to secure it and allow it for bandit analysis
message = repr(eval( # nosec
" ".join(arguments[1:]),
{"mudpy": mudpy, "universe": actor.universe}))
expanded.append(key)
# return one at random
- # Whitelist the random.randrange() call in bandit since it's not used for
+ # Allow the random.randrange() call in bandit since it's not used for
# security/cryptographic purposes
return random.choice(expanded) # nosec
name = ""
# create a name of random length from the syllables
- # Whitelist the random.randrange() call in bandit since it's not used for
+ # Allow the random.randrange() call in bandit since it's not used for
# security/cryptographic purposes
for _syllable in range(random.randrange(2, 6)): # nosec
name += weighted_choice(syllables)
# provided in the LICENSE file distributed with this software.
[tox]
-minversion = 3.1
+minversion = 3.18
envlist = bandit, codespell, dist, docs, flake8, yamllint, selftest_config, py3
skipsdist = True
ignore_basepython_conflict = True
commands = mudpy {posargs}
[testenv:dist]
-whitelist_externals = rm
+allowlist_externals = rm
deps =
pbr
twine
[testenv:docs]
setenv =
PYTHONWARNINGS=error
-whitelist_externals = rm
+allowlist_externals = rm
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt