mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Replace list of constants with tuples of constants.
This commit is contained in:
parent
07ead17318
commit
dbecd93b72
11 changed files with 29 additions and 29 deletions
|
@ -216,7 +216,7 @@ def _getaction(action):
|
|||
if not action:
|
||||
return "default"
|
||||
if action == "all": return "always" # Alias
|
||||
for a in ['default', 'always', 'ignore', 'module', 'once', 'error']:
|
||||
for a in ('default', 'always', 'ignore', 'module', 'once', 'error'):
|
||||
if a.startswith(action):
|
||||
return a
|
||||
raise _OptionError("invalid action: %r" % (action,))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue