Always use a list for namedtuple.

This commit is contained in:
Florian Bruhin 2014-09-28 00:43:08 +02:00
parent 0fadf6b091
commit 65d1d21d2e
4 changed files with 3 additions and 4 deletions

View File

@ -127,7 +127,6 @@ style
tree?
- Stuff under scripts/ (especially generate_doc and run_checks) could use a
rewrite.
- Always use a list as argument for namedtuple?
- Use separate logger for config
- Use unittest.Mock and especially unittest.patch more.
- Use decorators for on_config_changed

View File

@ -34,7 +34,7 @@ from qutebrowser.commands import userscripts, cmdexc, cmdutils
from qutebrowser.utils import usertypes, log, qtutils, message, objreg
ElemTuple = collections.namedtuple('ElemTuple', 'elem, label')
ElemTuple = collections.namedtuple('ElemTuple', ['elem', 'label'])
Target = usertypes.enum('Target', ['normal', 'tab', 'tab_bg', 'yank',

View File

@ -57,7 +57,7 @@ class Command:
"""
AnnotationInfo = collections.namedtuple('AnnotationInfo',
'kwargs, typ, name, flag')
['kwargs', 'typ', 'name', 'flag'])
ParamType = usertypes.enum('ParamType', ['flag', 'positional'])
def __init__(self, name, split, hide, instance, completion, modes,

View File

@ -209,7 +209,7 @@ class ContentDispositionValue:
peg.optional(';'))
LangTagged = collections.namedtuple('LangTagged', 'string langtag')
LangTagged = collections.namedtuple('LangTagged', ['string', 'langtag'])
class DuplicateParamError(Exception):